From 93c2d09136e1f9691dd86c1db3784294cfcb1714 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 8 Apr 2021 12:58:05 +0100 Subject: [PATCH] golang: Partially fix the tests. ./guestfs.go:4945:16: conversion from _Ctype_char (int8) to string yields a string of one rune, not a string of digits (did you mean fmt.Sprint(x)?) ./guestfs.go:7320:16: conversion from _Ctype_char (int8) to string yields a string of one rune, not a string of digits (did you mean fmt.Sprint(x)?) ./guestfs.go:7335:16: conversion from _Ctype_char (int8) to string yields a string of one rune, not a string of digits (did you mean fmt.Sprint(x)?) --- generator/golang.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generator/golang.ml b/generator/golang.ml index 04a771a64..d328abe4e 100644 --- a/generator/golang.ml +++ b/generator/golang.ml @@ -480,7 +480,7 @@ func return_hashtable (argv **C.char) map[string]string { pr " return C.GoString (r), nil\n" | RConstOptString _ -> pr " if r != nil {\n"; - pr " r_s := string (*r)\n"; + pr " r_s := string (rune (*r))\n"; pr " return &r_s, nil\n"; pr " } else {\n"; pr " return nil, nil\n";