-
Notifications
You must be signed in to change notification settings - Fork 759
Closed
Labels
Description
Input C/C++ Header
extern const int foo[1];
Bindgen Invocation
$ bindgen input.h
Actual Results
/* automatically generated by rust-bindgen */
extern "C" {
pub static mut foo: [::std::os::raw::c_int; 1usize];
}
Expected Results
/* automatically generated by rust-bindgen */
extern "C" {
pub static foo: [::std::os::raw::c_int; 1usize];
}
The const from the array seems to be lost. Arrays are a bit strange in C, but as best I can tell when you put const
on an array it does in fact mean that values in the array are const, and as such the binding on the Rust side should not be mut
.