summaryrefslogtreecommitdiff
path: root/yjit/src/utils.rs
diff options
context:
space:
mode:
Diffstat (limited to 'yjit/src/utils.rs')
-rw-r--r--yjit/src/utils.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/yjit/src/utils.rs b/yjit/src/utils.rs
index 5f42ba1fdb..bea57e4fc2 100644
--- a/yjit/src/utils.rs
+++ b/yjit/src/utils.rs
@@ -122,14 +122,12 @@ yjit_print_iseq(const rb_iseq_t *iseq)
#[cfg(target_arch = "aarch64")]
macro_rules! c_callable {
- (fn $f:ident $args:tt -> $ret:ty $body:block) => { fn $f $args -> $ret $body };
- (fn $f:ident $args:tt $body:block) => { fn $f $args $body };
+ (fn $f:ident $args:tt $(-> $ret:ty)? $body:block) => { extern "C" fn $f $args $(-> $ret)? $body };
}
#[cfg(target_arch = "x86_64")]
macro_rules! c_callable {
- (fn $f:ident $args:tt -> $ret:ty $body:block) => { extern "sysv64" fn $f $args -> $ret $body };
- (fn $f:ident $args:tt $body:block) => { extern "sysv64" fn $f $args $body };
+ (fn $f:ident $args:tt $(-> $ret:ty)? $body:block) => { extern "sysv64" fn $f $args $(-> $ret)? $body };
}
pub(crate) use c_callable;