summaryrefslogtreecommitdiff
path: root/gtkcasts_unix.go
diff options
context:
space:
mode:
Diffstat (limited to 'gtkcasts_unix.go')
-rw-r--r--gtkcasts_unix.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/gtkcasts_unix.go b/gtkcasts_unix.go
index 133f596..287ed58 100644
--- a/gtkcasts_unix.go
+++ b/gtkcasts_unix.go
@@ -28,9 +28,9 @@ func togbool(b bool) C.gboolean {
return C.FALSE
}
-// TODO wrap in C.GoString()?
-func fromgchar(what *C.gchar) *C.char {
- return (*C.char)(unsafe.Pointer(what))
+func fromgchar(what *C.gchar) string {
+ cstr := (*C.char)(unsafe.Pointer(what))
+ return C.GoString(cstr)
}
func togchar(what *C.char) *C.gchar {