diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2003-08-21 04:42:56 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-08-21 04:42:56 +0000 |
commit | ed08b2c61bbd3fcbc9931b185a9cf6a0a56f9acf (patch) | |
tree | 3375c977eefe5b2ab3983ab6eca4cc75dd3e336a /scope.c | |
parent | c077e42241e3d5377a0e2cabae1cede852824d7c (diff) | |
download | perl-ed08b2c61bbd3fcbc9931b185a9cf6a0a56f9acf.tar.gz |
Retract #19064, broke mod_perl flushing (localisation of $|).
http://public.activestate.com/cgi-bin/perlbrowse?patch=19064
http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2003-08/msg01466.html
p4raw-id: //depot/perl@20795
Diffstat (limited to 'scope.c')
-rw-r--r-- | scope.c | 13 |
1 files changed, 3 insertions, 10 deletions
@@ -624,9 +624,6 @@ Perl_save_aelem(pTHX_ AV *av, I32 idx, SV **sptr) SSPUSHINT(idx); SSPUSHPTR(SvREFCNT_inc(*sptr)); SSPUSHINT(SAVEt_AELEM); - /* if it gets reified later, the restore will have the wrong refcnt */ - if (!AvREAL(av) && AvREIFY(av)) - SvREFCNT_inc(*sptr); save_scalar_at(sptr); sv = *sptr; /* If we're localizing a tied array element, this new sv @@ -709,7 +706,7 @@ Perl_leave_scope(pTHX_ I32 base) value = (SV*)SSPOPPTR; gv = (GV*)SSPOPPTR; ptr = &GvSV(gv); - av = (AV*)gv; /* what to refcnt_dec */ + SvREFCNT_dec(gv); goto restore_sv; case SAVEt_GENERIC_PVREF: /* generic pv */ str = (char*)SSPOPPTR; @@ -742,7 +739,6 @@ Perl_leave_scope(pTHX_ I32 base) case SAVEt_SVREF: /* scalar reference */ value = (SV*)SSPOPPTR; ptr = SSPOPPTR; - av = Nullav; /* what to refcnt_dec */ restore_sv: sv = *(SV**)ptr; DEBUG_S(PerlIO_printf(Perl_debug_log, @@ -778,8 +774,6 @@ Perl_leave_scope(pTHX_ I32 base) SvSETMAGIC(value); PL_localizing = 0; SvREFCNT_dec(value); - if (av) /* actually an av, hv or gv */ - SvREFCNT_dec(av); break; case SAVEt_AV: /* array reference */ av = (AV*)SSPOPPTR; @@ -989,14 +983,13 @@ Perl_leave_scope(pTHX_ I32 base) value = (SV*)SSPOPPTR; i = SSPOPINT; av = (AV*)SSPOPPTR; - if (!AvREAL(av) && AvREIFY(av)) /* undo reify guard */ - SvREFCNT_dec(value); ptr = av_fetch(av,i,1); if (ptr) { sv = *(SV**)ptr; if (sv && sv != &PL_sv_undef) { if (SvTIED_mg((SV*)av, PERL_MAGIC_tied)) (void)SvREFCNT_inc(sv); + SvREFCNT_dec(av); goto restore_sv; } } @@ -1014,8 +1007,8 @@ Perl_leave_scope(pTHX_ I32 base) ptr = &HeVAL((HE*)ptr); if (SvTIED_mg((SV*)hv, PERL_MAGIC_tied)) (void)SvREFCNT_inc(*(SV**)ptr); + SvREFCNT_dec(hv); SvREFCNT_dec(sv); - av = (AV*)hv; /* what to refcnt_dec */ goto restore_sv; } } |