Commit 66a01c8
authored
fix: use consistent u32 type for enum constants on Windows (#4)
bindgen generates enum constants as i32 on Windows MSVC (C standard:
enum underlying type is int) but u32 on GCC/Clang when all values are
non-negative. This causes type mismatch errors when using the constants.
Add .default_enum_style(bindgen::EnumVariation::Consts) combined with
.translate_enum_integer_types(true) to force consistent unsigned types
across all platforms.
Co-authored-by: kaju <kajukitli@users.noreply.github.com>1 parent 72ea8e6 commit 66a01c8
1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
269 | 274 | | |
270 | 275 | | |
271 | 276 | | |
| |||
0 commit comments