Add ABI-compatibility assertion
This commit is contained in:
parent
8b05b629ae
commit
de5dd40a4f
13
src/abi.rs
13
src/abi.rs
@ -118,7 +118,18 @@ macro_rules! binding {
|
||||
};
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "unwinder"))]
|
||||
#[cfg(feature = "unwinder")]
|
||||
macro_rules! binding {
|
||||
() => {};
|
||||
(unsafe extern $abi: literal fn $name: ident ($($arg: ident : $arg_ty: ty),*$(,)?) $(-> $ret: ty)?; $($rest: tt)*) => {
|
||||
const _: unsafe extern $abi fn($($arg_ty),*) $(-> $ret)? = $name;
|
||||
};
|
||||
|
||||
(extern $abi: literal fn $name: ident ($($arg: ident : $arg_ty: ty),*$(,)?) $(-> $ret: ty)?; $($rest: tt)*) => {
|
||||
const _: extern $abi fn($($arg_ty),*) $(-> $ret)? = $name;
|
||||
};
|
||||
}
|
||||
|
||||
binding! {
|
||||
extern "C" fn _Unwind_GetGR(unwind_ctx: &UnwindContext<'_>, index: c_int) -> usize;
|
||||
extern "C" fn _Unwind_GetCFA(unwind_ctx: &UnwindContext<'_>) -> usize;
|
||||
|
Loading…
Reference in New Issue
Block a user