From 6797988b273c1f95c01750967b12cf4be188cdbf Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Sat, 10 Sep 2011 18:15:03 +0200 Subject: Remove from Storable.xs all compatibility code that duplicates ppport.h The rest should probably be migrated to Devel::PPPort. --- dist/Storable/Storable.xs | 50 +---------------------------------------------- 1 file changed, 1 insertion(+), 49 deletions(-) diff --git a/dist/Storable/Storable.xs b/dist/Storable/Storable.xs index 9b4bb463ba..876a323522 100644 --- a/dist/Storable/Storable.xs +++ b/dist/Storable/Storable.xs @@ -22,6 +22,7 @@ #define NEED_vload_module #define NEED_newCONSTSUB #define NEED_newSVpvn_flags +#define NEED_newRV_noinc #include "ppport.h" /* handle old perls */ #endif @@ -49,60 +50,15 @@ * Earlier versions of perl might be used, we can't assume they have the latest! */ -#ifndef PERL_VERSION /* For perls < 5.6 */ -#define PERL_VERSION PATCHLEVEL -#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 */ -#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 */ -#define newSVpvn newSVpv -#endif -#endif /* PATCHLEVEL <= 4 */ #ifndef HvSHAREKEYS_off #define HvSHAREKEYS_off(hv) /* Ignore */ #endif -#ifndef AvFILLp /* Older perls (<=5.003) lack AvFILLp */ -#define AvFILLp AvFILL -#endif -typedef double NV; /* Older perls lack the NV type */ -#define IVdf "ld" /* Various printf formats for Perl types */ -#define UVuf "lu" -#define UVof "lo" -#define UVxf "lx" -#define INT2PTR(t,v) (t)(IV)(v) -#define PTR2UV(v) (unsigned long)(v) -#endif /* PERL_VERSION -- perls < 5.6 */ - -#ifndef NVef /* The following were not part of perl 5.6 */ -#if defined(USE_LONG_DOUBLE) && \ - defined(HAS_LONG_DOUBLE) && defined(PERL_PRIfldbl) -#define NVef PERL_PRIeldbl -#define NVff PERL_PRIfldbl -#define NVgf PERL_PRIgldbl -#else -#define NVef "e" -#define NVff "f" -#define NVgf "g" -#endif -#endif /* perl <= 5.8.2 needs this */ #ifndef SvIsCOW # define SvIsCOW(sv) 0 #endif -#ifndef SvRV_set -#define SvRV_set(sv, val) \ - STMT_START { \ - assert(SvTYPE(sv) >= SVt_RV); \ - (((XRV*)SvANY(sv))->xrv_rv = (val)); \ - } STMT_END -#endif - #ifndef HvRITER_set # define HvRITER_set(hv,r) (HvRITER(hv) = r) #endif @@ -117,10 +73,6 @@ typedef double NV; /* Older perls lack the NV type */ # define HvEITER_get HvEITER #endif -#ifndef HvNAME_get -#define HvNAME_get HvNAME -#endif - #ifndef HvPLACEHOLDERS_get # define HvPLACEHOLDERS_get HvPLACEHOLDERS #endif -- cgit v1.2.1