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
cgo turns incomplete types into [0]byte behind the scenes. This means that a pointer to
an incomplete type can be assigned to a pointer to any other incomplete type.
Example:
package main
/*
typedef struct foo foo_t;
typedef struct bar bar_t;
foo_t* foofunc() {
return 0;
}
bar_t* barfunc() {
return 0;
}
*/
import "C"
func main() {
var a *C.foo_t
a = C.barfunc()
_ = a
}
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: