Skip to content

Commit e1e1f2b

Browse files
19118605381911860538
andauthored
refactor(ffi): specify "C" ABI explicitly in ffi_fn! macro (#3937)
Co-authored-by: 1911860538 <[email protected]>
1 parent 64ab7ae commit e1e1f2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ffi/macros.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ macro_rules! ffi_fn {
22
($(#[$doc:meta])* fn $name:ident($($arg:ident: $arg_ty:ty),*) -> $ret:ty $body:block ?= $default:expr) => {
33
$(#[$doc])*
44
#[no_mangle]
5-
pub extern fn $name($($arg: $arg_ty),*) -> $ret {
5+
pub extern "C" fn $name($($arg: $arg_ty),*) -> $ret {
66
use std::panic::{self, AssertUnwindSafe};
77

88
match panic::catch_unwind(AssertUnwindSafe(move || $body)) {

0 commit comments

Comments
 (0)