diff options
-rw-r--r-- | embedvar.h | 4 | ||||
-rw-r--r-- | ext/Storable/Storable.pm | 2 | ||||
-rw-r--r-- | ext/Storable/Storable.xs | 8 | ||||
-rw-r--r-- | intrpvar.h | 3 | ||||
-rw-r--r-- | perlapi.h | 4 | ||||
-rw-r--r-- | perlvars.h | 4 | ||||
-rw-r--r-- | sv.c | 5 |
7 files changed, 9 insertions, 21 deletions
diff --git a/embedvar.h b/embedvar.h index 2fe48407d6..21d166cf4f 100644 --- a/embedvar.h +++ b/embedvar.h @@ -396,7 +396,6 @@ #define PL_sv_count (vTHX->Isv_count) #define PL_sv_no (vTHX->Isv_no) #define PL_sv_objcount (vTHX->Isv_objcount) -#define PL_sv_placeholder (vTHX->Isv_placeholder) #define PL_sv_root (vTHX->Isv_root) #define PL_sv_undef (vTHX->Isv_undef) #define PL_sv_yes (vTHX->Isv_yes) @@ -701,7 +700,6 @@ #define PL_Isv_count PL_sv_count #define PL_Isv_no PL_sv_no #define PL_Isv_objcount PL_sv_objcount -#define PL_Isv_placeholder PL_sv_placeholder #define PL_Isv_root PL_sv_root #define PL_Isv_undef PL_sv_undef #define PL_Isv_yes PL_sv_yes @@ -907,6 +905,7 @@ #define PL_patleave (PL_Vars.Gpatleave) #define PL_sh_path (PL_Vars.Gsh_path) #define PL_sigfpe_saved (PL_Vars.Gsigfpe_saved) +#define PL_sv_placeholder (PL_Vars.Gsv_placeholder) #define PL_thr_key (PL_Vars.Gthr_key) #else /* !PERL_GLOBAL_STRUCT */ @@ -922,6 +921,7 @@ #define PL_Gpatleave PL_patleave #define PL_Gsh_path PL_sh_path #define PL_Gsigfpe_saved PL_sigfpe_saved +#define PL_Gsv_placeholder PL_sv_placeholder #define PL_Gthr_key PL_thr_key #endif /* PERL_GLOBAL_STRUCT */ diff --git a/ext/Storable/Storable.pm b/ext/Storable/Storable.pm index e1a72f6a83..81c94c8507 100644 --- a/ext/Storable/Storable.pm +++ b/ext/Storable/Storable.pm @@ -21,7 +21,7 @@ package Storable; @ISA = qw(Exporter DynaLoader); use AutoLoader; use vars qw($canonical $forgive_me $VERSION); -$VERSION = '2.07'; +$VERSION = '2.08'; *AUTOLOAD = \&AutoLoader::AUTOLOAD; # Grrr... # diff --git a/ext/Storable/Storable.xs b/ext/Storable/Storable.xs index 055aefc8fc..e3447004a7 100644 --- a/ext/Storable/Storable.xs +++ b/ext/Storable/Storable.xs @@ -2208,11 +2208,7 @@ static int store_hash(stcxt_t *cxt, HV *hv) = (((hash_flags & SHV_RESTRICTED) && SvREADONLY(val)) ? SHV_K_LOCKED : 0); -#ifdef PL_sv_placeholder if (val == &PL_sv_placeholder) -#else - if (val == &PL_sv_undef) -#endif flags |= SHV_K_PLACEHOLDER; keyval = SvPV(key, keylen_tmp); @@ -2308,11 +2304,7 @@ static int store_hash(stcxt_t *cxt, HV *hv) = (((hash_flags & SHV_RESTRICTED) && SvREADONLY(val)) ? SHV_K_LOCKED : 0); -#ifdef PL_sv_placeholder if (val == &PL_sv_placeholder) -#else - if (val == &PL_sv_undef) -#endif flags |= SHV_K_PLACEHOLDER; hek = HeKEY_hek(he); diff --git a/intrpvar.h b/intrpvar.h index dbb9a12ebd..6a34ea4e67 100644 --- a/intrpvar.h +++ b/intrpvar.h @@ -531,9 +531,6 @@ PERLVAR(IDBassertion, SV *) PERLVARI(Icv_has_eval, I32, 0) /* PL_compcv includes an entereval or similar */ -/* Restricted hashes placeholder value */ -PERLVAR(Isv_placeholder, SV) - /* New variables must be added to the very end, before this comment, * for binary compatibility (the offsets of the old members must not change). * (Don't forget to add your variable also to perl_clone()!) @@ -550,8 +550,6 @@ END_EXTERN_C #define PL_sv_no (*Perl_Isv_no_ptr(aTHX)) #undef PL_sv_objcount #define PL_sv_objcount (*Perl_Isv_objcount_ptr(aTHX)) -#undef PL_sv_placeholder -#define PL_sv_placeholder (*Perl_Isv_placeholder_ptr(aTHX)) #undef PL_sv_root #define PL_sv_root (*Perl_Isv_root_ptr(aTHX)) #undef PL_sv_undef @@ -950,6 +948,8 @@ END_EXTERN_C #define PL_sh_path (*Perl_Gsh_path_ptr(NULL)) #undef PL_sigfpe_saved #define PL_sigfpe_saved (*Perl_Gsigfpe_saved_ptr(NULL)) +#undef PL_sv_placeholder +#define PL_sv_placeholder (*Perl_Gsv_placeholder_ptr(NULL)) #undef PL_thr_key #define PL_thr_key (*Perl_Gthr_key_ptr(NULL)) diff --git a/perlvars.h b/perlvars.h index 081139969d..83124d805f 100644 --- a/perlvars.h +++ b/perlvars.h @@ -59,3 +59,7 @@ PERLVARI(Gsh_path, char *, SH_PATH)/* full path of shell */ * See perl.h macros PERL_FPU_INIT and PERL_FPU_{PRE,POST}_EXEC. */ PERLVAR(Gsigfpe_saved, Sighandler_t) +/* Restricted hashes placeholder value. + * The contents are never used, only the address. */ +PERLVAR(Gsv_placeholder, SV) + @@ -10913,11 +10913,6 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags, SvNVX(&PL_sv_yes) = 1; ptr_table_store(PL_ptr_table, &proto_perl->Isv_yes, &PL_sv_yes); - SvANY(&PL_sv_placeholder) = NULL; - SvREFCNT(&PL_sv_placeholder)= (~(U32)0)/2; - SvFLAGS(&PL_sv_placeholder) = SVf_READONLY|SVt_NULL; - ptr_table_store(PL_ptr_table, &proto_perl->Isv_placeholder, &PL_sv_placeholder); - /* create (a non-shared!) shared string table */ PL_strtab = newHV(); HvSHAREKEYS_off(PL_strtab); |