From: Robert May Date: Sun, 22 Jul 2007 02:29:37 +0000 (+0100) Subject: XSUB.h - silence MSVC6 compiler warning X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4ef0c66ee576bfc2e9944029fde5fa533ac892b6;p=p5sagit%2Fp5-mst-13.2.git XSUB.h - silence MSVC6 compiler warning From: "Robert May" Message-ID: <54bdc7510707211829t67e8b82eo7d8e722e73c6a3b3@mail.gmail.com> p4raw-id: //depot/perl@31653 --- diff --git a/XSUB.h b/XSUB.h index c93ed2d..268a2ff 100644 --- a/XSUB.h +++ b/XSUB.h @@ -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 61e023f..966cdc8 100644 --- a/pod/perlxs.pod +++ b/pod/perlxs.pod @@ -1391,7 +1391,7 @@ C with offsets being C, C, C, C. 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 )