*Hi, all*

It's been a month since I started Golang.
But I was in a difficult situation. I need your help.

*C code*

int reopen (const char *fn, time_t check_interval_sec, int (*callback_func) 
(int num_entry, char **entry), int retry);


*Go code*

func _Open(fileName string, intervalSec int, f func(C.int, **C.char) C.int) 
int {

   cFileName := C.CString(fileName)

   defer C.free(unsafe.Pointer(cFileName))


    ret := C.reopen(cFileName, C.long(intervalSec), f, 1)

    return int(ret)

}

error message 
cannot use f (variable of type func(_Ctype_int, **_Ctype_char) _Ctype_int) 
as *[0]byte value in argument to (_Cfunc_reopen)

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/644e20e4-0734-4fe7-be0e-0b4d101df1fdn%40googlegroups.com.

Reply via email to