summaryrefslogtreecommitdiff
path: root/XSUB.h
diff options
context:
space:
mode:
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); \