diff options
author | Nicholas Clark <nick@ccl4.org> | 2021-05-24 18:51:45 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2021-08-30 07:40:21 +0000 |
commit | c4651bb069093655fae90cd51f80372e68e3fa0f (patch) | |
tree | 1097db6b03b3d45e800e2e9cdaca7a58168be7d3 /dist | |
parent | 2adefdbe7526a9bca64108394d6321f34019e4bb (diff) | |
download | perl-c4651bb069093655fae90cd51f80372e68e3fa0f.tar.gz |
Storable implicitly needs >= v5.6.1, so remove code for earlier versions.
The perl code has 3-arg open and our, meaning at least v5.6.0, but the XS
code needs bytes_from_utf8 which is only in v5.6.1 and not in ppport.h
Diffstat (limited to 'dist')
-rw-r--r-- | dist/Storable/Storable.pm | 2 | ||||
-rw-r--r-- | dist/Storable/Storable.xs | 41 |
2 files changed, 3 insertions, 40 deletions
diff --git a/dist/Storable/Storable.pm b/dist/Storable/Storable.pm index c1c94f04c1..af71fbfb30 100644 --- a/dist/Storable/Storable.pm +++ b/dist/Storable/Storable.pm @@ -28,7 +28,7 @@ our @EXPORT_OK = qw( our ($canonical, $forgive_me); BEGIN { - our $VERSION = '3.24'; + our $VERSION = '3.24_50'; } our $recursion_limit; diff --git a/dist/Storable/Storable.xs b/dist/Storable/Storable.xs index d96f4fac3f..12d29f2585 100644 --- a/dist/Storable/Storable.xs +++ b/dist/Storable/Storable.xs @@ -519,14 +519,9 @@ static MAGIC *THX_sv_magicext(pTHX_ #if defined(MULTIPLICITY) || defined(PERL_OBJECT) || defined(PERL_CAPI) -#if PERL_VERSION_LT(5,4,68) -#define dSTCXT_SV \ - SV *perinterp_sv = get_sv(MY_VERSION, 0) -#else /* >= perl5.004_68 */ #define dSTCXT_SV \ SV *perinterp_sv = *hv_fetch(PL_modglobal, \ MY_VERSION, sizeof(MY_VERSION)-1, TRUE) -#endif /* < perl5.004_68 */ #define dSTCXT_PTR(T,name) \ T name = ((perinterp_sv \ @@ -1010,9 +1005,7 @@ static const char byteorderstr_56[] = {BYTEORDER_BYTES_56, 0}; #define STORABLE_BIN_MAJOR 2 /* Binary major "version" */ #define STORABLE_BIN_MINOR 11 /* Binary minor "version" */ -#if PERL_VERSION_LT(5,6,0) -#define STORABLE_BIN_WRITE_MINOR 4 -#elif !defined (SvVOK) +#if !defined (SvVOK) /* * Perl 5.6.0-5.8.0 can do weak references, but not vstring magic. */ @@ -1023,7 +1016,7 @@ static const char byteorderstr_56[] = {BYTEORDER_BYTES_56, 0}; #define STORABLE_BIN_WRITE_MINOR 11 #else #define STORABLE_BIN_WRITE_MINOR 9 -#endif /* PERL_VERSION_LT(5,6,0) */ +#endif #if PERL_VERSION_LT(5,8,1) #define PL_sv_placeholder PL_sv_undef @@ -1648,12 +1641,10 @@ static void init_store_context(pTHX_ * * It is reported fixed in 5.005, hence the #if. */ -#if PERL_VERSION_GE(5,5,0) #define HBUCKETS 4096 /* Buckets for %hseen */ #ifndef USE_PTR_TABLE HvMAX(cxt->hseen) = HBUCKETS - 1; /* keys %hseen = $HBUCKETS; */ #endif -#endif /* * The 'hclass' hash uses the same settings as 'hseen' above, but it is @@ -1665,9 +1656,7 @@ static void init_store_context(pTHX_ cxt->hclass = newHV(); /* Where seen classnames are stored */ -#if PERL_VERSION_GE(5,5,0) HvMAX(cxt->hclass) = HBUCKETS - 1; /* keys %hclass = $HBUCKETS; */ -#endif /* * The 'hook' hash table is used to keep track of the references on @@ -3309,12 +3298,6 @@ static int store_lhash(pTHX_ stcxt_t *cxt, HV *hv, unsigned char hash_flags) */ static int store_code(pTHX_ stcxt_t *cxt, CV *cv) { -#if PERL_VERSION_LT(5,6,0) - /* - * retrieve_code does not work with perl 5.005 or less - */ - return store_other(aTHX_ cxt, (SV*)cv); -#else dSP; STRLEN len; STRLEN count, reallen; @@ -3405,7 +3388,6 @@ static int store_code(pTHX_ stcxt_t *cxt, CV *cv) TRACEME(("ok (code)")); return 0; -#endif } #if PERL_VERSION_LT(5,8,0) @@ -6687,9 +6669,6 @@ static SV *retrieve_flag_hash(pTHX_ stcxt_t *cxt, const char *cname) */ static SV *retrieve_code(pTHX_ stcxt_t *cxt, const char *cname) { -#if PERL_VERSION_LT(5,6,0) - CROAK(("retrieve_code does not work with perl 5.005 or less\n")); -#else dSP; I32 type, count; IV tagnum; @@ -6811,7 +6790,6 @@ static SV *retrieve_code(pTHX_ stcxt_t *cxt, const char *cname) av_store(cxt->aseen, tagnum, SvREFCNT_inc(sv)); return sv; -#endif } static SV *retrieve_regexp(pTHX_ stcxt_t *cxt, const char *cname) { @@ -7580,22 +7558,7 @@ static SV *do_retrieve( if (!sv) { TRACEMED(("retrieve ERROR")); -#if PERL_VERSION_LT(5,5,0) - /* perl 5.00405 seems to screw up at this point with an - 'attempt to modify a read only value' error reported in the - eval { $self = pretrieve(*FILE) } in _retrieve. - I can't see what the cause of this error is, but I suspect a - bug in 5.004, as it seems to be capable of issuing spurious - errors or core dumping with matches on $@. I'm not going to - spend time on what could be a fruitless search for the cause, - so here's a bodge. If you're running 5.004 and don't like - this inefficiency, either upgrade to a newer perl, or you are - welcome to find the problem and send in a patch. - */ - return newSV(0); -#else return &PL_sv_undef; /* Something went wrong, return undef */ -#endif } TRACEMED(("retrieve got %s(0x%" UVxf ")", |