]> git.proxmox.com Git - perlmod.git/commitdiff
perlmod: perl_fn for fn types w/o body
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Fri, 17 Dec 2021 08:16:53 +0000 (09:16 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Fri, 17 Dec 2021 08:16:53 +0000 (09:16 +0100)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
perlmod/src/ffi.rs

index acea15318404a16c67da38069465067c18d43a2a..c6fc38e572ed0f8ea41db82d1672a12e43a175fc 100644 (file)
@@ -93,6 +93,13 @@ mod vtbl_types_impl {
 
     #[macro_export]
     macro_rules! perl_fn {
+        ($(
+            $(#[$attr:meta])*
+            extern "C" fn($($args:tt)*) $(-> $re:ty)?
+        )*) => {$(
+            $(#[$attr])*
+            extern "C" fn(*const $crate::ffi::Interpreter, $($args)*) $(-> $re)?
+        )*};
         ($(
             $(#[$attr:meta])*
             extern "C" fn $name:ident ($($args:tt)*) $(-> $re:ty)? {
@@ -130,6 +137,13 @@ mod vtbl_types_impl {
 
     #[macro_export]
     macro_rules! perl_fn {
+        ($(
+            $(#[$attr:meta])*
+            extern "C" fn($($args:tt)*) $(-> $re:ty)?
+        )*) => {$(
+            $(#[$attr])*
+            extern "C" fn($($args)*) $(-> $re)?
+        )*};
         ($(
             $(#[$attr:meta])*
             extern "C" fn $name:ident ($($args:tt)*) $(-> $re:ty)? {