diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 1997-11-28 22:39:39 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 1997-11-28 22:39:39 +0000 |
commit | 5b0d9cbecfd90628c0e955ee142f05f9b60bcf43 (patch) | |
tree | af50799266dd7553b6090aa7116baf1118b5c659 /XSUB.h | |
parent | 04dc04aa73cc58d998c1f2e8d4c3f8576eee7e49 (diff) | |
download | perl-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.h | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -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 |