We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
Test case:
class Stream { public: virtual void write(char* string); virtual void write(void* buffer, unsigned int size); };
Code generated by bindgen 1e26a8a:
#[repr(C)] #[derive(Debug, Copy)] pub struct Struct_Stream { pub _vftable: *const _vftable_Struct_Stream, } #[repr(C)] pub struct _vftable_Struct_Stream { pub write: unsafe extern "C" fn(this: *mut ::std::os::raw::c_void, string: *mut ::std::os::raw::c_char), pub write: unsafe extern "C" fn(this: *mut ::std::os::raw::c_void, buffer: *mut ::std::os::raw::c_void, size: ::std::os::raw::c_uint), } impl ::std::clone::Clone for Struct_Stream { fn clone(&self) -> Self { *self } } #[test] fn bindgen_test_layout_Struct_Stream() { assert_eq!(::std::mem::size_of::<Struct_Stream>() , 8usize); assert_eq!(::std::mem::align_of::<Struct_Stream>() , 8usize); }
Struct fields with the same name are an error in Rust. Similar code fails with:
--> src/bindings.rs:1987:5 | 1985 | pub write: unsafe extern "C" fn(this: *mut ::std::os::raw::c_void, b: u8) | - `write` first declared here 1986 | -> usize, 1987 | pub write: unsafe extern "C" fn(this: *mut ::std::os::raw::c_void, | ^ field already declared
The field names should probably be deduplicated by appending an integer, like for names of non-virtual methods.
CC @emilio @nox
The text was updated successfully, but these errors were encountered:
Auto merge of #52 - servo:dedup-virtual-overloaded-names, r=emilio
89e2725
Deduplicate names of virtual overloaded methods. Fix #48 r? @emilio
5210a9f
Handle re-declaration of a global variable. Fix rust-lang#48
5cc0d93
No branches or pull requests
Test case:
Code generated by bindgen 1e26a8a:
Struct fields with the same name are an error in Rust. Similar code fails with:
The field names should probably be deduplicated by appending an integer, like for names of non-virtual methods.
CC @emilio @nox
The text was updated successfully, but these errors were encountered: