Skip to content
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

Allow pointers to anything in extern/exported declarations #1258

Merged
merged 2 commits into from Jul 18, 2018

Conversation

Hejsil
Copy link
Sponsor Contributor

@Hejsil Hejsil commented Jul 18, 2018

closes #1073
This is a more general solution, that allows all pointers in extern/exported decls as long as the pointer is not size 0 (this is to avoid *void problems).

This PR also allows zig to generate opage types for none extern structs/enums/unions in the generated C headers. In theory, we should be able to generate opage types for all Zig types that cannot be represented in C, but it is not clear to me what names these types should have.

@Hejsil Hejsil changed the title Allow pointers to any struct in extern/exported declarations Allow pointers to anything in extern/exported declarations Jul 18, 2018
@andrewrk andrewrk merged commit fd3a41d into master Jul 18, 2018
@andrewrk andrewrk deleted the extern-ptr-to-everything branch July 18, 2018 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow pointers to any struct in extern/exported declarations
2 participants