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

Generate constants to match the types they're used as #166

Closed
ian-h-chamberlain opened this issue Feb 25, 2024 · 0 comments · Fixed by #180
Closed

Generate constants to match the types they're used as #166

ian-h-chamberlain opened this issue Feb 25, 2024 · 0 comments · Fixed by #180

Comments

@ian-h-chamberlain
Copy link
Member

For a number of "macro constants", the bindings generate them using the c_int type, but they're actually intended for use as another type like u16 or something.

Might make sense for us to just generate this constant as a u16 via bindgen's ParseCallbacks::int_macro, to help prevent conversions.

In fact I wonder if we can't do this for a bunch of other constants and stop using as, maybe I'll file a separate issue for this more broadly

Originally posted by @ian-h-chamberlain in #156 (comment)

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 a pull request may close this issue.

1 participant