From: John Peacock Date: Thu, 24 May 2001 22:14:01 +0000 (-0400) Subject: Re: [ID 20010426.005] Magic not being removed at scope exit [PATCH] X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=06759ea031c43fa8236d70242f3d2f6e2fddd408;p=p5sagit%2Fp5-mst-13.2.git Re: [ID 20010426.005] Magic not being removed at scope exit [PATCH] Message-ID: <3B0DBFE9.A7C49084@rowman.com> p4raw-id: //depot/perl@10214 --- diff --git a/mg.c b/mg.c index 0c865bc..59233f7 100644 --- a/mg.c +++ b/mg.c @@ -51,7 +51,7 @@ S_save_magic(pTHX_ I32 mgs_ix, SV *sv) SvMAGICAL_off(sv); SvREADONLY_off(sv); - SvFLAGS(sv) |= (SvFLAGS(sv) & (SVp_IOK|SVp_NOK|SVp_POK)) >> PRIVSHIFT; + SvFLAGS(sv) |= (SvFLAGS(sv) & (SVp_NOK|SVp_POK)) >> PRIVSHIFT; } /* diff --git a/scope.c b/scope.c index d9e1ecf..a82c0f5 100644 --- a/scope.c +++ b/scope.c @@ -203,7 +203,7 @@ S_save_scalar_at(pTHX_ SV **sptr) mg->mg_obj = osv; } SvFLAGS(osv) |= (SvFLAGS(osv) & - (SVp_IOK|SVp_NOK|SVp_POK)) >> PRIVSHIFT; + (SVp_NOK|SVp_POK)) >> PRIVSHIFT; PL_tainted = oldtainted; } SvMAGIC(sv) = SvMAGIC(osv); @@ -699,7 +699,7 @@ Perl_leave_scope(pTHX_ I32 base) SvTYPE(value) != SVt_PVGV) { SvFLAGS(value) |= (SvFLAGS(value) & - (SVp_IOK|SVp_NOK|SVp_POK)) >> PRIVSHIFT; + (SVp_NOK|SVp_POK)) >> PRIVSHIFT; SvMAGICAL_off(value); /* XXX this is a leak when we get here because the * mg_get() in save_scalar_at() croaked */ diff --git a/sv.c b/sv.c index bbb0d7e..d852712 100644 --- a/sv.c +++ b/sv.c @@ -4206,7 +4206,7 @@ Perl_sv_unmagic(pTHX_ SV *sv, int type) } if (!SvMAGIC(sv)) { SvMAGICAL_off(sv); - SvFLAGS(sv) |= (SvFLAGS(sv) & (SVp_IOK|SVp_NOK|SVp_POK)) >> PRIVSHIFT; + SvFLAGS(sv) |= (SvFLAGS(sv) & (SVp_NOK|SVp_POK)) >> PRIVSHIFT; } return 0;