-
Notifications
You must be signed in to change notification settings - Fork 714
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
745d606
commit 8c02105
Showing
8 changed files
with
120 additions
and
3 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
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 |
---|---|---|
|
@@ -10,3 +10,6 @@ authors = [ | |
|
||
[dependencies] | ||
objc = "0.2" | ||
|
||
[build-dependencies] | ||
rustc_version = "0.2" |
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(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] | ||
|
||
|
||
#[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 | ||
} | ||
} |
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,48 @@ | ||
/* automatically generated by rust-bindgen */ | ||
|
||
|
||
#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] | ||
#![cfg(feature = "nightly")] | ||
#![feature(abi_thiscall)] | ||
|
||
#[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)) | ||
); | ||
} | ||
extern "thiscall" { | ||
#[link_name = "\u{1}?test@Foo@@QAEXXZ"] | ||
pub fn Foo_test(this: *mut Foo); | ||
} | ||
extern "thiscall" { | ||
#[link_name = "\u{1}?test2@Foo@@QAEHH@Z"] | ||
pub fn Foo_test2(this: *mut Foo, var: ::std::os::raw::c_int) -> ::std::os::raw::c_int; | ||
} | ||
impl Clone for Foo { | ||
fn clone(&self) -> Self { | ||
*self | ||
} | ||
} | ||
impl Foo { | ||
#[inline] | ||
pub unsafe fn test(&mut self) { | ||
Foo_test(self) | ||
} | ||
#[inline] | ||
pub unsafe fn test2(&mut self, var: ::std::os::raw::c_int) -> ::std::os::raw::c_int { | ||
Foo_test2(self, var) | ||
} | ||
} |
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,7 @@ | ||
// bindgen-flags: --rust-target 1.0 -- --target=i686-pc-windows-msvc | ||
|
||
class Foo { | ||
public: | ||
void test(); | ||
int test2(int var); | ||
}; |
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,7 @@ | ||
// bindgen-flags: --rust-target nightly --raw-line '#![cfg(feature = "nightly")]' --raw-line '#![feature(abi_thiscall)]' -- --target=i686-pc-windows-msvc | ||
|
||
class Foo { | ||
public: | ||
void test(); | ||
int test2(int var); | ||
}; |