diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-06-13 16:16:07 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-06-13 16:16:07 +0000 |
commit | 895349d4a309bd187260c1e6ada40aadb52544cb (patch) | |
tree | bc2415e921f314ea83ef155de561ec40360aafcf /ext/Storable | |
parent | fe4a5e1fbb83ffbce81a0da0ffeb69d3ffef3a82 (diff) | |
download | perl-895349d4a309bd187260c1e6ada40aadb52544cb.tar.gz |
Similar logic as DB_File.xs, using the modern macros and
defines them to older ones for older Perls where PERL_VERSION
is not defined, from Doug MacEachern.
p4raw-id: //depot/perl@10565
Diffstat (limited to 'ext/Storable')
-rw-r--r-- | ext/Storable/Storable.xs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/ext/Storable/Storable.xs b/ext/Storable/Storable.xs index 6663998940..f045acbd4e 100644 --- a/ext/Storable/Storable.xs +++ b/ext/Storable/Storable.xs @@ -75,18 +75,20 @@ #ifndef PERL_VERSION /* For perls < 5.6 */ #include <patchlevel.h> -#define PERL_VERSION PATCHLEVEL +#define PERL_REVISION 5 +#define PERL_VERSION PATCHLEVEL +#define PERL_SUBVERSION SUBVERSION #ifndef newRV_noinc #define newRV_noinc(sv) ((Sv = newRV(sv)), --SvREFCNT(SvRV(Sv)), Sv) #endif -#if (PATCHLEVEL <= 4) /* Older perls (<= 5.004) lack PL_ namespace */ +#if (PERL_VERSION <= 4) /* Older perls (<= 5.004) lack PL_ namespace */ #define PL_sv_yes sv_yes #define PL_sv_no sv_no #define PL_sv_undef sv_undef -#if (SUBVERSION <= 4) /* 5.004_04 has been reported to lack newSVpvn */ +#if (PERL_SUBVERSION <= 4) /* 5.004_04 has been reported to lack newSVpvn */ #define newSVpvn newSVpv #endif -#endif /* PATCHLEVEL <= 4 */ +#endif /* PERL_VERSION <= 4 */ #ifndef HvSHAREKEYS_off #define HvSHAREKEYS_off(hv) /* Ignore */ #endif @@ -296,7 +298,7 @@ typedef struct stcxt { #if defined(MULTIPLICITY) || defined(PERL_OBJECT) || defined(PERL_CAPI) -#if (PATCHLEVEL <= 4) && (SUBVERSION < 68) +#if (PERL_VERSION <= 4) && (PERL_SUBVERSION < 68) #define dSTCXT_SV \ SV *perinterp_sv = perl_get_sv(MY_VERSION, FALSE) #else /* >= perl5.004_68 */ |