-
Couldn't load subscription status.
- Fork 768
Open
Labels
Description
Input C/C++ Header
enum TestEnum {
FOO,
BAR
};
Bindgen Invocation
$ bindgen input.h
Actual Results
On Windows:
/* automatically generated by rust-bindgen 0.56.0 */
pub const TestEnum_FOO: TestEnum = 0;
pub const TestEnum_BAR: TestEnum = 1;
pub type TestEnum = ::std::os::raw::c_int;On Ubuntu:
/* automatically generated by rust-bindgen 0.56.0 */
pub const TestEnum_FOO: TestEnum = 0;
pub const TestEnum_BAR: TestEnum = 1;
pub type TestEnum = ::std::os::raw::c_uint;Expected Results
This should be documented somewhere. All I found is this comment: #1096 (comment)
Bindgen uses whatever enum type comes from clang, so if it's a u32, clang is picking a u32 type for it.
adamgoon, bczhc, AndreyMZ, gyk, sidcha and 5 more