summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-09-10 18:15:03 +0200
committerNicholas Clark <nick@ccl4.org>2011-09-14 11:49:38 +0200
commit6797988b273c1f95c01750967b12cf4be188cdbf (patch)
treee2d01dde71692102e5b6e6be25798225b45e5d3e
parent70e1279abb4368eade75848c2010a9bd421908b5 (diff)
downloadperl-6797988b273c1f95c01750967b12cf4be188cdbf.tar.gz
Remove from Storable.xs all compatibility code that duplicates ppport.h
The rest should probably be migrated to Devel::PPPort.
-rw-r--r--dist/Storable/Storable.xs50
1 files changed, 1 insertions, 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