-
Notifications
You must be signed in to change notification settings - Fork 720
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
Document somewhere that enums can be either c_int or c_uint #1966
Comments
Turns out (rust-lang/rust-bindgen#1966) that clang uses different underlying type for enums in different systems, which causes insignificant differences between platforms. Let's be consistent.
A more precise definition is that bindgen will use |
can we have an option to just always make a c_int on all platforms, because the signedness only matters to Rust and C doesn't care? |
The Win32 and OpenGL3 built-in ImGui backends are now compiled into the Rust library. Bindings are not generated for them so the user needs to create them manually, but this is the first step. Revert update to latest cimgui and regenerated bindings Note: do not update to latest cimgui version or regenerate the bindings on Windows due to this bug: rust-lang/rust-bindgen#1966
Resurrecting this thread because we just stumbled upon the same issue. In our case we have something like the following:
I believe the problem here is that the enumeration constants should always be |
Just stumbled over this as well. For reference: https://stackoverflow.com/a/366033/1717115 Basically the C standard specifies that an enum value always needs to be representable by |
Input C/C++ Header
enum TestEnum { FOO, BAR };
Bindgen Invocation
Actual Results
On Windows:
On Ubuntu:
Expected Results
This should be documented somewhere. All I found is this comment: #1096 (comment)
The text was updated successfully, but these errors were encountered: