From a87395e67f1eb40f6622c1105f222a70a533c1fd Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Thu, 3 Feb 2022 09:41:19 +0100 Subject: [PATCH] doc updates Signed-off-by: Wolfgang Bumiller --- perlmod/src/ffi.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/perlmod/src/ffi.rs b/perlmod/src/ffi.rs index 4d30d02..9e0ce9f 100644 --- a/perlmod/src/ffi.rs +++ b/perlmod/src/ffi.rs @@ -65,6 +65,11 @@ pub struct Interpreter { _ffi: usize, } +/// Build perl-compatible functions and fn types (`pTHX` macro equivalent). +/// +/// Takes an `extern "C" fn` (with or without body) and potentially inserts the a +/// `*const Interpreter` as first parameter depending on the perl configuration, so it can be used +/// for xsub implementations. #[macro_export] macro_rules! perl_fn { // inherited visibility