gucio321
(gucio321)
1
I have C struct like that:
typedef struct {
void* data;
} foo;
I want to use CGO to copy it to equivalent go struct
type foo struct {
data unsafe.Pointer
}
but I get panic: runtime error: cgo argument has Go pointer to unpinned Go pointer
what should I do?
gucio321
(gucio321)
2
also, when I try to pin the data
using runtime.Pinner it complains that data IS NOT go pointer…
skillian
(Sean Killian)
3
How are you setting the data
field before you pass it to C?
gucio321
(gucio321)
4
Ok, bug in pinner will be fixed in next go release