X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pp_hot.c;h=de2dec44645c44f9b1ed08f80b9d92e94aa525f0;hb=8849edfd7e990957ceb72629c600ff2b74b838b1;hp=98229a23036915363b0602c6b70130ee3935fa31;hpb=8d1f198fe997a3eac9dc901e973cdc46ac8bbdec;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pp_hot.c b/pp_hot.c index 98229a2..de2dec4 100644 --- a/pp_hot.c +++ b/pp_hot.c @@ -1699,17 +1699,8 @@ PP(pp_helem) STRLEN keylen; char *key = SvPV(keysv, keylen); SAVEDELETE(hv, savepvn(key,keylen), keylen); - } else { - SV *sv; + } else save_helem(hv, keysv, svp); - sv = *svp; - /* If we're localizing a tied hash element, this new - * sv won't actually be stored in the hash - so it - * won't get reaped when the localize ends. Ensure it - * gets reaped by mortifying it instead. DAPM */ - if (SvTIED_mg(sv, PERL_MAGIC_tiedelem)) - sv_2mortal(sv); - } } } else if (PL_op->op_private & OPpDEREF) @@ -2964,17 +2955,8 @@ PP(pp_aelem) PUSHs(lv); RETURN; } - if (PL_op->op_private & OPpLVAL_INTRO) { - SV *sv; + if (PL_op->op_private & OPpLVAL_INTRO) save_aelem(av, elem, svp); - sv = *svp; - /* If we're localizing a tied array element, this new sv - * won't actually be stored in the array - so it won't get - * reaped when the localize ends. Ensure it gets reaped by - * mortifying it instead. DAPM */ - if (SvTIED_mg(sv, PERL_MAGIC_tiedelem)) - sv_2mortal(sv); - } else if (PL_op->op_private & OPpDEREF) vivify_ref(*svp, PL_op->op_private & OPpDEREF); }