diff options
author | Dave Mitchell <davem@fdisolutions.com> | 2002-05-08 01:11:02 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-05-07 22:24:59 +0000 |
commit | 4849835437f4dd80ff68a3f700e19dea843f3b8d (patch) | |
tree | 6c3e5220924d3e7de4228a28d745ca21503f2c79 /pp_hot.c | |
parent | 73c5cb31fb5a9e748f3d331f30d588ace4ac59fb (diff) | |
download | perl-4849835437f4dd80ff68a3f700e19dea843f3b8d.tar.gz |
Re: [PATCH scope.c] Re: local($tied->{foo}) leaks
Message-ID: <20020508001102.D4118@fdgroup.com>
p4raw-id: //depot/perl@16456
Diffstat (limited to 'pp_hot.c')
-rw-r--r-- | pp_hot.c | 22 |
1 files changed, 2 insertions, 20 deletions
@@ -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); } |