Closed russel closed 10 years ago
Can you try first type converting the CallbackArg to a uintptr, and see if that works?
return C.GoString((*C.char)(unsafe.Pointer(uintptr(c))))
Compiles fine with that change.
The glib package should build fine without this change now. The code was reworked to change how callbacks work, and the CallbackArg type is no longer used. Let me know if there is any more code that sneaks in that breaks the build on gccgo.
Building using the 3.8 tag on Debian Unstable with the default toolchain seems to work fine. However trying to us GCCGO leads to the following:
|> go install -compiler gccgo -gccgoflags -O3 -tags gtk_3_8 github.com/conformal/gotk3/gtk
github.com/conformal/gotk3/glib
../github.com/conformal/gotk3/glib/glib.go:157:54: error: invalid type conversion (cannot use type CallbackArg as type unsafe.Pointer) return C.GoString((*C.char)(unsafe.Pointer(c))) ^