diff options
author | Chip Salzenberg <chip@pobox.com> | 2008-11-10 08:00:40 -0800 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2008-11-12 10:37:46 +0000 |
commit | 9711599ee3b2375539002b6ddc0873ec478916bb (patch) | |
tree | 0e22f4b859b7e8d870441377be736909ca5a8960 /scope.c | |
parent | 0c8767aeceb5f1c68d6318e2c8809e9913930642 (diff) | |
download | perl-9711599ee3b2375539002b6ddc0873ec478916bb.tar.gz |
Re: [perl #60360] [PATCH] local $SIG{FOO} = sub {...}; sets signal
Message-ID: <20081111000040.GB19329@tytlal.topaz.cx>
p4raw-id: //depot/perl@34819
Diffstat (limited to 'scope.c')
-rw-r--r-- | scope.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -164,7 +164,7 @@ Perl_free_tmps(pTHX) } STATIC SV * -S_save_scalar_at(pTHX_ SV **sptr) +S_save_scalar_at(pTHX_ SV **sptr, I32 empty) { dVAR; SV * const osv = *sptr; @@ -179,7 +179,7 @@ S_save_scalar_at(pTHX_ SV **sptr) (SVp_IOK|SVp_NOK|SVp_POK)) >> PRIVSHIFT; PL_tainted = oldtainted; } - mg_localize(osv, sv); + mg_localize(osv, sv, empty); } return sv; } @@ -199,7 +199,7 @@ Perl_save_scalar(pTHX_ GV *gv) SSPUSHPTR(SvREFCNT_inc_simple(gv)); SSPUSHPTR(SvREFCNT_inc(*sptr)); SSPUSHINT(SAVEt_SV); - return save_scalar_at(sptr); + return save_scalar_at(sptr, TRUE); /* XXX - FIXME - see #60360 */ } /* Like save_sptr(), but also SvREFCNT_dec()s the new value. Can be used to @@ -321,7 +321,7 @@ Perl_save_ary(pTHX_ GV *gv) GvAV(gv) = NULL; av = GvAVn(gv); if (SvMAGIC(oav)) - mg_localize(MUTABLE_SV(oav), MUTABLE_SV(av)); + mg_localize(MUTABLE_SV(oav), MUTABLE_SV(av), TRUE); return av; } @@ -341,7 +341,7 @@ Perl_save_hash(pTHX_ GV *gv) GvHV(gv) = NULL; hv = GvHVn(gv); if (SvMAGIC(ohv)) - mg_localize(MUTABLE_SV(ohv), MUTABLE_SV(hv)); + mg_localize(MUTABLE_SV(ohv), MUTABLE_SV(hv), TRUE); return hv; } @@ -611,7 +611,7 @@ Perl_save_aelem(pTHX_ AV *av, I32 idx, SV **sptr) /* if it gets reified later, the restore will have the wrong refcnt */ if (!AvREAL(av) && AvREIFY(av)) SvREFCNT_inc_void(*sptr); - save_scalar_at(sptr); + save_scalar_at(sptr, TRUE); /* XXX - FIXME - see #60360 */ sv = *sptr; /* If we're localizing a tied array element, this new sv * won't actually be stored in the array - so it won't get @@ -622,7 +622,7 @@ Perl_save_aelem(pTHX_ AV *av, I32 idx, SV **sptr) } void -Perl_save_helem(pTHX_ HV *hv, SV *key, SV **sptr) +Perl_save_helem(pTHX_ HV *hv, SV *key, SV **sptr, I32 empty) { dVAR; SV *sv; @@ -635,7 +635,7 @@ Perl_save_helem(pTHX_ HV *hv, SV *key, SV **sptr) SSPUSHPTR(newSVsv(key)); SSPUSHPTR(SvREFCNT_inc(*sptr)); SSPUSHINT(SAVEt_HELEM); - save_scalar_at(sptr); + save_scalar_at(sptr, empty); sv = *sptr; /* If we're localizing a tied hash element, this new sv * won't actually be stored in the hash - so it won't get @@ -657,7 +657,7 @@ Perl_save_svref(pTHX_ SV **sptr) SSPUSHPTR(sptr); SSPUSHPTR(SvREFCNT_inc(*sptr)); SSPUSHINT(SAVEt_SVREF); - return save_scalar_at(sptr); + return save_scalar_at(sptr, TRUE); /* XXX - FIXME - see #60360 */ } void |