-
Notifications
You must be signed in to change notification settings - Fork 698
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #606 - emilio:gen-constructors, r=emilio
options: Allow configuring the generation of constructors. Fixes #556 Sorry for the delay fixing this btw.
- Loading branch information
Showing
3 changed files
with
38 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* automatically generated by rust-bindgen */ | ||
|
||
|
||
#![allow(non_snake_case)] | ||
|
||
|
||
#[repr(C)] | ||
#[derive(Debug, Default, Copy)] | ||
pub struct Foo { | ||
pub _address: u8, | ||
} | ||
#[test] | ||
fn bindgen_test_layout_Foo() { | ||
assert_eq!(::std::mem::size_of::<Foo>() , 1usize , concat ! ( | ||
"Size of: " , stringify ! ( Foo ) )); | ||
assert_eq! (::std::mem::align_of::<Foo>() , 1usize , concat ! ( | ||
"Alignment of " , stringify ! ( Foo ) )); | ||
} | ||
impl Clone for Foo { | ||
fn clone(&self) -> Self { *self } | ||
} | ||
impl Foo { | ||
#[inline] | ||
pub unsafe fn new(a: ::std::os::raw::c_int) -> Self { | ||
let mut __bindgen_tmp = ::std::mem::uninitialized(); | ||
Foo_Foo(&mut __bindgen_tmp, a); | ||
__bindgen_tmp | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// bindgen-flags: --generate types,constructors | ||
|
||
class Foo { | ||
public: | ||
Foo(int a); | ||
}; |