You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.
The Go equivalent to C's void* type is unsafe.Pointer, and the cgo tool automatically wraps functions that accept or return void* to accept or return unsafe.Pointer instead.
cwrappers.go currently includes some functions that accept *C.void arguments, but none of them are actually called. If they were, you would likely find that the call sites require two conversions (to unsafe.Pointer and then to *C.void) where they should need only one (to unsafe.Pointer).
The text was updated successfully, but these errors were encountered:
bcmills
changed the title
cwrappers.go erroneously uses *C.void instead of unsafe.Pointer
cwrappers.go uses *C.void instead of unsafe.Pointer
Sep 15, 2017
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The Go equivalent to C's
void*
type isunsafe.Pointer
, and the cgo tool automatically wraps functions that accept or returnvoid*
to accept or returnunsafe.Pointer
instead.cwrappers.go
currently includes some functions that accept*C.void
arguments, but none of them are actually called. If they were, you would likely find that the call sites require two conversions (tounsafe.Pointer
and then to*C.void
) where they should need only one (tounsafe.Pointer
).The text was updated successfully, but these errors were encountered: