diff options
-rw-r--r-- | XSUB.h | 4 | ||||
-rw-r--r-- | pod/perlxs.pod | 2 |
2 files changed, 4 insertions, 2 deletions
@@ -144,11 +144,13 @@ is a lexical $_ in scope. #ifdef __cplusplus # define XSINTERFACE_CVT(ret,name) ret (*name)(...) +# define XSINTERFACE_CVT_ANON(ret) ret (*)(...) #else # define XSINTERFACE_CVT(ret,name) ret (*name)() +# define XSINTERFACE_CVT_ANON(ret) ret (*)() #endif #define dXSFUNCTION(ret) XSINTERFACE_CVT(ret,XSFUNCTION) -#define XSINTERFACE_FUNC(ret,cv,f) ((XSINTERFACE_CVT(ret,))(f)) +#define XSINTERFACE_FUNC(ret,cv,f) ((XSINTERFACE_CVT_ANON(ret))(f)) #define XSINTERFACE_FUNC_SET(cv,f) \ CvXSUBANY(cv).any_dxptr = (void (*) (pTHX_ void*))(f) diff --git a/pod/perlxs.pod b/pod/perlxs.pod index 61e023f3a6..966cdc89df 100644 --- a/pod/perlxs.pod +++ b/pod/perlxs.pod @@ -1391,7 +1391,7 @@ C<fp[]> with offsets being C<multiply_off>, C<divide_off>, C<add_off>, C<subtract_off>. Then one can use #define XSINTERFACE_FUNC_BYOFFSET(ret,cv,f) \ - ((XSINTERFACE_CVT(ret,))fp[CvXSUBANY(cv).any_i32]) + ((XSINTERFACE_CVT_ANON(ret))fp[CvXSUBANY(cv).any_i32]) #define XSINTERFACE_FUNC_BYOFFSET_set(cv,f) \ CvXSUBANY(cv).any_i32 = CAT2( f, _off ) |