-
Notifications
You must be signed in to change notification settings - Fork 792
Open
Description
Given the following C heder:
const int* foo = ((int*) 3ULL);bindgen will generate the following Rust code:
/* automatically generated by rust-bindgen 0.71.1 */
unsafe extern "C" {
pub static mut foo: *const ::std::os::raw::c_int;
}The output I would expect (and need) to be generated is the following:
const FOO: *const c_int = 3usize as *const c_int;Questions
- Is there any way to configure
bindgento provide the output above? - Is the generation of current output a feature or a bug?
- If it is a feature, what is the rationale behind it?
For context, we are hitting this in the Linux kernel when generating bindings for these kind of pointers.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels