2019-03-03 06:07:22 +01:00
|
|
|
/// cbindgen:prefix-with-name
|
|
|
|
#[repr(C, u8)]
|
|
|
|
pub enum H {
|
2020-04-22 01:26:37 +02:00
|
|
|
/// cbindgen:variant-mut-cast-attributes=MY_ATTRS
|
2019-03-03 06:07:22 +01:00
|
|
|
Foo(i16),
|
2020-04-22 01:26:37 +02:00
|
|
|
/// cbindgen:variant-const-cast-attributes=MY_ATTRS
|
2019-03-03 06:07:22 +01:00
|
|
|
Bar { x: u8, y: i16 },
|
2020-04-22 01:26:37 +02:00
|
|
|
/// cbindgen:variant-is-attributes=MY_ATTRS
|
2019-03-03 06:07:22 +01:00
|
|
|
Baz
|
|
|
|
}
|
|
|
|
|
|
|
|
/// cbindgen:prefix-with-name
|
|
|
|
#[repr(C, u8, u16)]
|
|
|
|
pub enum I {
|
2020-04-22 01:26:37 +02:00
|
|
|
/// cbindgen:variant-constructor-attributes=MY_ATTRS
|
2019-03-03 06:07:22 +01:00
|
|
|
Foo(i16),
|
2020-04-22 01:26:37 +02:00
|
|
|
/// cbindgen:eq-attributes=MY_ATTRS
|
2019-03-03 06:07:22 +01:00
|
|
|
Bar { x: u8, y: i16 },
|
|
|
|
Baz
|
|
|
|
}
|
|
|
|
|
|
|
|
/// cbindgen:prefix-with-name
|
|
|
|
#[repr(C, u8)]
|
|
|
|
pub enum J {
|
|
|
|
Foo(i16),
|
|
|
|
Bar { x: u8, y: i16 },
|
|
|
|
Baz
|
|
|
|
}
|
|
|
|
|
|
|
|
/// cbindgen:prefix-with-name
|
|
|
|
#[repr(u8)]
|
|
|
|
pub enum K {
|
|
|
|
Foo(i16),
|
|
|
|
Bar { x: u8, y: i16 },
|
|
|
|
Baz
|
|
|
|
}
|
|
|
|
|
|
|
|
#[no_mangle]
|
|
|
|
pub extern "C" fn foo(
|
|
|
|
h: H,
|
|
|
|
i: I,
|
|
|
|
j: J,
|
|
|
|
k: K,
|
|
|
|
) {}
|