.cargo/vendor/cbindgen/tests/rust/cfg_2.rs
raw| 1 | #[cfg(any(windows, unix))] |
| 2 | #[repr(C)] |
| 3 | struct Foo { |
| 4 | x: i32, |
| 5 | } |
| 6 | |
| 7 | #[cfg(windows)] |
| 8 | #[repr(C)] |
| 9 | struct Bar { |
| 10 | y: Foo, |
| 11 | } |
| 12 | |
| 13 | #[cfg(unix)] |
| 14 | #[repr(C)] |
| 15 | struct Bar { |
| 16 | z: Foo, |
| 17 | } |
| 18 | |
| 19 | #[repr(C)] |
| 20 | struct Root { |
| 21 | w: Bar, |
| 22 | } |
| 23 | |
| 24 | #[cfg(windows)] |
| 25 | pub const DEFAULT_X: i32 = 0x08; |
| 26 | |
| 27 | #[cfg(unix)] |
| 28 | pub const DEFAULT_X: i32 = 0x2a; |
| 29 | |
| 30 | #[no_mangle] |
| 31 | pub extern "C" fn root(a: Root) |
| 32 | { } |