.cargo/vendor/cbindgen/tests/rust/body.rs
raw| 1 | |
| 2 | #[repr(C)] |
| 3 | pub struct MyFancyStruct { |
| 4 | i: i32, |
| 5 | } |
| 6 | |
| 7 | #[repr(C)] |
| 8 | pub enum MyFancyEnum { |
| 9 | Foo, |
| 10 | Bar(i32), |
| 11 | Baz(i32), |
| 12 | } |
| 13 | |
| 14 | #[repr(C)] |
| 15 | pub enum MyCLikeEnum { |
| 16 | Foo1, |
| 17 | Bar1, |
| 18 | Baz1, |
| 19 | } |
| 20 | |
| 21 | #[repr(C)] |
| 22 | pub union MyUnion { |
| 23 | pub f: f32, |
| 24 | pub u: u32, |
| 25 | } |
| 26 | |
| 27 | |
| 28 | #[repr(C)] |
| 29 | pub struct MyFancyStruct_Prepended { |
| 30 | i: i32, |
| 31 | } |
| 32 | |
| 33 | #[repr(C)] |
| 34 | pub enum MyFancyEnum_Prepended { |
| 35 | Foo_Prepended, |
| 36 | Bar_Prepended(i32), |
| 37 | Baz_Prepended(i32), |
| 38 | } |
| 39 | |
| 40 | #[repr(C)] |
| 41 | pub enum MyCLikeEnum_Prepended { |
| 42 | Foo1_Prepended, |
| 43 | Bar1_Prepended, |
| 44 | Baz1_Prepended, |
| 45 | } |
| 46 | |
| 47 | #[repr(C)] |
| 48 | pub union MyUnion_Prepended { |
| 49 | pub f: f32, |
| 50 | pub u: u32, |
| 51 | } |
| 52 | |
| 53 | |
| 54 | #[no_mangle] |
| 55 | pub extern "C" fn root(s: MyFancyStruct, e: MyFancyEnum, c: MyCLikeEnum, u: MyUnion, sp: MyFancyStruct_Prepended, ep: MyFancyEnum_Prepended, cp: MyCLikeEnum_Prepended, up: MyUnion_Prepended) {} |