I have to pass C pointers between packages so I used uintptr like how 
syscall does things.
However go vet gives the message "possible misuse of unsafe.Pointer". 

Is there something I could do to avoid vet complaining?

Package A:
type Foo struct {
procAddr uintptr
}

func (f Foo) ProcAddr() uintptr {
return f.procAddr
}

func Bar() Foo {
        return Foo{C.SomeFunc()}
}

Package B:
p := C.ASDF(unsafe.Pointer(A.Bar().ProcAddr())) // possible misuse of 
unsafe.Pointer

-- 
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/2d105d81-88d0-4ed3-aebf-9ced35f89ec9%40googlegroups.com.

Reply via email to