rust-bindgen
rust-bindgen copied to clipboard
Missing constant defines when definition is a cast
Input C/C++ Header
test.h
#define LOWPRIORITY ((unsigned short) 0xffff)
Bindgen Invocation
$ bindgen test.h
Actual Results
/* automatically generated by rust-bindgen 0.69.2 */
Expected Results
/* automatically generated by rust-bindgen 0.69.2 */
pub const LOWPRIORITY: u32 = 65535;
or even better:
/* automatically generated by rust-bindgen 0.69.2 */
pub const LOWPRIORITY: u16 = 65535;
When I do the same on windows, I don't see this problem. So this appears to be a linux issue. (perhaps the c toolchains in use)