rust-bindgen
rust-bindgen copied to clipboard
bad type recognition, despite explicit suffix
This code:
#define CELL_WIDEASIAN_MASK 0x8000000000000000ull
#define CELL_NOBACKGROUND_MASK 0x0400000000000000ull
results in:
pub const CELL_WIDEASIAN_MASK: i64 = -9223372036854775808;
pub const CELL_NOBACKGROUND_MASK: u64 = 288230376151711744;
It seems bindgen just notices the leftmost bit on, and decides to turn it into an i64 despite the ull suffix that clearly indicates it should be a u64.
This is probably an issue in https://github.com/jethrogb/rust-cexpr, which only gives us i64s to begin with.
I wonder if #1782 fixes this.
Seems related: #923