2020-09-29 11:28:13 +02:00
|
|
|
#[repr(C)]
|
|
|
|
pub struct MyStruct {
|
|
|
|
number: Box<i32>,
|
|
|
|
}
|
|
|
|
|
|
|
|
pub struct NotReprC<T> {
|
|
|
|
inner: T,
|
|
|
|
}
|
|
|
|
|
|
|
|
pub type Foo = NotReprC<Box<i32>>;
|
|
|
|
|
|
|
|
#[no_mangle]
|
|
|
|
pub extern "C" fn root(a: &Foo, with_box: &MyStruct) {}
|
|
|
|
|
|
|
|
#[no_mangle]
|
2020-09-29 13:26:33 +02:00
|
|
|
pub extern "C" fn drop_box(x: Box<i32>) {}
|
2020-09-29 13:40:07 +02:00
|
|
|
|
|
|
|
#[no_mangle]
|
|
|
|
pub extern "C" fn drop_box_opt(x: Option<Box<i32>>) {}
|