nsf/gogobject — pull request #11 by snyh (2013-10-28 10:31:23+00:00)
Title: check array type is zerotermized to fix empty slice problem in function ...

...like g_key_file_get_groups which is zero temized but hasn't an length annotation

for example:

func (this0 *KeyFile) GetGroups() (uint64, []string) {
var this1 *C.GKeyFile
var length1 C.uint64_t
this1 = (*C.GKeyFile)(unsafe.Pointer(this0))
ret1 := C.g_key_file_get_groups(this1, &length1)
var length2 uint64
var ret2 []string // This isn't init!!!!
length2 = uint64(length1)
for i := range ret2 {
ret2[i] = C.GoString((*(*[999999]*C.char)(unsafe.Pointer(ret1)))[i])
C.g_free(unsafe.Pointer((*(*[999999]*C.char)(unsafe.Pointer(ret1)))[i]))
}
return length2, ret2
}