Files
cbindgen/tests/rust/cfg.rs
T
2017-11-09 18:04:22 -05:00

42 lines
554 B
Rust

#[cfg(all(unix, x11))]
#[repr(u32)]
enum FooType {
A,
B,
C,
}
#[cfg(all(unix, x11))]
#[repr(C)]
struct FooHandle {
ty: FooType,
x: i32,
y: f32,
}
#[cfg(any(windows, target_pointer_width="32"))]
#[repr(u32)]
enum BarType {
A,
B,
C,
}
#[cfg(any(windows, target_pointer_width="32"))]
#[repr(C)]
struct BarHandle {
ty: BarType,
x: i32,
y: f32,
}
#[cfg(all(unix, x11))]
#[no_mangle]
extern "C" fn root(a: FooHandle)
{ }
#[cfg(any(windows, target_pointer_width="32"))]
#[no_mangle]
extern "C" fn root(a: BarHandle)
{ }