XSUB.h - silence MSVC6 compiler warning
Robert May [Sun, 22 Jul 2007 02:29:37 +0000 (03:29 +0100)]
From: "Robert May" <robertmay@cpan.org>
Message-ID: <54bdc7510707211829t67e8b82eo7d8e722e73c6a3b3@mail.gmail.com>

p4raw-id: //depot/perl@31653

XSUB.h
pod/perlxs.pod

diff --git a/XSUB.h b/XSUB.h
index c93ed2d..268a2ff 100644 (file)
--- 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)
 
index 61e023f..966cdc8 100644 (file)
@@ -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 )