summaryrefslogtreecommitdiff
path: root/XSUB.h
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>1997-11-28 22:39:39 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>1997-11-28 22:39:39 +0000
commit5b0d9cbecfd90628c0e955ee142f05f9b60bcf43 (patch)
treeaf50799266dd7553b6090aa7116baf1118b5c659 /XSUB.h
parent04dc04aa73cc58d998c1f2e8d4c3f8576eee7e49 (diff)
downloadperl-5b0d9cbecfd90628c0e955ee142f05f9b60bcf43.tar.gz
Builds completely with Mingw32, dynamic loaded extensions
don't work yet - suspect __declspec() non-implemented issues. p4raw-id: //depot/ansiperl@329
Diffstat (limited to 'XSUB.h')
-rw-r--r--XSUB.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/XSUB.h b/XSUB.h
index 054b4cc7f7..91d15e97b1 100644
--- a/XSUB.h
+++ b/XSUB.h
@@ -6,6 +6,12 @@
#define XS(name) void name(cv) CV* cv;
#endif
+#if defined(WIN32) && defined(__GNUC__)
+#define FORCE_ARG_STRING(x) #x
+#else
+#define FORCE_ARG_STRING(x) x
+#endif
+
#define dXSARGS \
dSP; dMARK; \
I32 ax = mark - stack_base + 1; \
@@ -43,6 +49,7 @@
#ifdef XS_VERSION
# define XS_VERSION_BOOTCHECK \
STMT_START { \
+ char *xs_version = FORCE_ARG_STRING(XSVERSION); \
char *vn = "", *module = SvPV(ST(0),na); \
if (items >= 2) /* version supplied as bootstrap arg */ \
Sv = ST(1); \
@@ -54,9 +61,9 @@
Sv = perl_get_sv(form("%s::%s", module, \
vn = "VERSION"), FALSE); \
} \
- if (Sv && (!SvOK(Sv) || strNE(XS_VERSION, SvPV(Sv, na)))) \
+ if (Sv && (!SvOK(Sv) || strNE(xs_version, SvPV(Sv, na)))) \
croak("%s object version %s does not match $%s::%s %_", \
- module, XS_VERSION, module, vn, Sv); \
+ module, xs_version, module, vn, Sv); \
} STMT_END
#else
# define XS_VERSION_BOOTCHECK