summaryrefslogtreecommitdiff
path: root/XSUB.h
diff options
context:
space:
mode:
authorIlya Zakharevich <ilya@math.berkeley.edu>1997-12-13 02:31:02 -0500
committerGurusamy Sarathy <gsar@cpan.org>1998-06-10 05:07:04 +0000
commitcfc02341d853e4bc320d3abf8ac8ac1c7c3ecaa5 (patch)
treea65ee6410d770674381345ac13973f1c4461d6f3 /XSUB.h
parente8bc2b5c76d1a38039163ea8705a1b689b104b57 (diff)
downloadperl-cfc02341d853e4bc320d3abf8ac8ac1c7c3ecaa5.tar.gz
xsubpp enhancements ($CPAN/authors/id/ILYAZ/patches/diff_xsubpp_65), a
variant of: Message-Id: <199712131231.HAA04125@monk.mps.ohio-state.edu> Subject: 5.004_55: xsubpp: new keywords INTERFACE C_ARGS p4raw-id: //depot/perl@1083
Diffstat (limited to 'XSUB.h')
-rw-r--r--XSUB.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/XSUB.h b/XSUB.h
index 06dc023694..cd8a732be0 100644
--- a/XSUB.h
+++ b/XSUB.h
@@ -19,6 +19,16 @@
#define dXSI32 I32 ix = XSANY.any_i32
+#ifdef __cplusplus
+# define XSINTERFACE_CVT(ret,name) ret (*name)(...)
+#else
+# define XSINTERFACE_CVT(ret,name) ret (*name)()
+#endif
+#define dXSFUNCTION(ret) XSINTERFACE_CVT(ret,XSFUNCTION)
+#define XSINTERFACE_FUNC(ret,cv,f) ((XSINTERFACE_CVT(ret,))(f))
+#define XSINTERFACE_FUNC_SET(cv,f) \
+ CvXSUBANY(cv).any_dptr = (void (*) _((void*)))(f)
+
#define XSRETURN(off) \
STMT_START { \
stack_sp = stack_base + ax + ((off) - 1); \