We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
CAPI void alt_RotationLayout_CAPI_Free_Forward(struct alt_RotationLayout* ptr); typedef struct alt_RotationLayout { float roll; float pitch; float yaw; } alt_RotationLayout; CAPI void alt_RotationLayout_CAPI_Free(struct alt_RotationLayout* ptr);
let bindings = bindgen::Builder::default() .rustfmt_bindings(true) .layout_tests(false) .header(format!("./altv-capi-{}-static-{}/include/altv-capi-{}.h", kind, platform, kind)) .parse_callbacks(Box::new(bindgen::CargoCallbacks)) .generate() .expect("Unable to generate bindings"); bindings .write_to_file(format!("src/altv_{}.rs", kind)) .expect("Couldn't write bindings!");
/* automatically generated by rust-bindgen 0.54.1 */ pub const true_: u32 = 1; pub const false_: u32 = 0; pub const __bool_true_false_are_defined: u32 = 1; pub type nullptr_t = *mut ::std::os::raw::c_void; extern "C" { pub fn alt_RotationLayout_CAPI_Free_Forward(ptr: *mut alt_RotationLayout); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct alt_RotationLayout { pub roll: f32, pub pitch: f32, pub yaw: f32, } extern "C" { pub fn alt_RotationLayout_CAPI_Free(ptr: *mut alt_RotationLayout); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct alt_RotationLayout { pub _address: u8, }
No duplicate definitions (when using forward declared pointers).
/* automatically generated by rust-bindgen 0.54.1 */ pub const true_: u32 = 1; pub const false_: u32 = 0; pub const __bool_true_false_are_defined: u32 = 1; pub type nullptr_t = *mut ::std::os::raw::c_void; #[repr(C)] #[derive(Debug, Copy, Clone)] extern "C" { pub fn alt_RotationLayout_CAPI_Free_Forward(ptr: *mut alt_RotationLayout); } pub struct alt_RotationLayout { pub roll: f32, pub pitch: f32, pub yaw: f32, } extern "C" { pub fn alt_RotationLayout_CAPI_Free(ptr: *mut alt_RotationLayout); }
The text was updated successfully, but these errors were encountered:
Isn't this somewhat related to #2227 ?
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Input C/C++ Header
Bindgen Invocation
Actual Results
Expected Results
No duplicate definitions (when using forward declared pointers).
The text was updated successfully, but these errors were encountered: