-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/cgo: document cgo [0]byte bug fix #7958
Labels
Milestone
Comments
Comment 1 by miha.dimec@visionect.com: Ups sorry for typing error. I meant cgo namespace in the title. |
Comment 4 by miha.dimec@visionect.com: This is correct behavior then? |
You are using C.foo types in your exported API. I don't believe this ever worked. Internally C.foo becomes a name like *_C_foo. Those names are different in different packages: you cannot pass a *gdk._C_foo where a *cairo._C_foo is expected. This may have worked in the past because cgo was incorrectly turning all undefined structs into *[0]byte, so that they were all interchangeable. CL https://golang.org/cl/76450043 fixed this. I think the fix is correct and that your original program was incorrect. This issue is now about documenting the [0]byte change in that CL. Status changed to Accepted. |
Maybe http://golang.org/cmd/cgo should also talk about how C.foo names get translated. Currently, it only speaks of a "pseudo-package", which might lead one to believe that all C.foo refer to the same C.foo, no matter in which package they appear. |
Comment 8 by miha.dimec@visionect.com: Ok thank you. Then corrections need to be made inside library. |
CL https://golang.org/cl/91520043 mentions this issue. |
CL https://golang.org/cl/91590044 mentions this issue. |
This issue was closed by revision 7ef0eb1. Status changed to Fixed. |
This issue was closed by revision 3f66c0c. |
wheatman
pushed a commit
to wheatman/go-akaros
that referenced
this issue
Jun 25, 2018
Fixes golang#7958. LGTM=rsc R=golang-codereviews, rsc, r, gobot CC=golang-codereviews https://golang.org/cl/91520043
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
by miha.dimec@visionect.com:
The text was updated successfully, but these errors were encountered: