-
Notifications
You must be signed in to change notification settings - Fork 723
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
Add option to translate enum integer types to native Rust integer types #2004
Conversation
1e6de44
to
1fc3aca
Compare
@@ -2543,6 +2543,8 @@ impl<'a> EnumBuilder<'a> { | |||
}, | |||
|
|||
EnumVariation::Rust { .. } => { | |||
// `repr` is guaranteed to be Rustified in Enum::codegen | |||
attrs.insert(0, quote! { #[repr( #repr )] }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using insert
instead of push
to avoid having to update lots of test cases.
1fc3aca
to
73be2a9
Compare
☔ The latest upstream changes (presumably 7286c81) made this pull request unmergeable. Please resolve the merge conflicts. |
73be2a9
to
b9dbb39
Compare
b9dbb39
to
3e406ec
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks sensible, thanks!
152: Update bindgen r=raoulstrackx a=jethrogb I took some time this week to make the necessary bindgen changes (rust-lang/rust-bindgen#2004 rust-lang/rust-bindgen#2006 rust-lang/rust-bindgen#2007). This PR updates the bindgen build to use that. Breaking changes: * unnamed types are renamed * C-unions are now actual unions * [x] the field accessor functions that used to exist are easy enough to add back * bitfields are done differently now * some fn-ptrs are now unsafe * some fns and fn-ptrs now take const pointers as arguments * havege.c and timing.c are now not compiled on non-unix platforms, i.e. SGX (probably wasn't working properly anyway) Fixes #5 #14 #61 #72 #88 #121 Co-authored-by: Jethro Beekman <[email protected]>
Fixes #430