X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=scope.c;h=e976f3c9fae554dc86d6f60803256e6f2bde1e03;hb=0904bc86c896844c90e158fde0faac617014287e;hp=7c02951d260231c4abba8d89b20614e6411654b1;hpb=a26e96dff1c9d91b0bf389e6149016d8a3f26e49;p=p5sagit%2Fp5-mst-13.2.git diff --git a/scope.c b/scope.c index 7c02951..e976f3c 100644 --- a/scope.c +++ b/scope.c @@ -673,9 +673,7 @@ Perl_leave_scope(pTHX_ I32 base) DEBUG_S(PerlIO_printf(Perl_debug_log, "restore svref: %p %p:%s -> %p:%s\n", ptr, sv, SvPEEK(sv), value, SvPEEK(value))); - if (SvTYPE(sv) >= SVt_PVMG && SvMAGIC(sv) && - SvTYPE(sv) != SVt_PVGV) - { + if (SvTYPE(sv) == SVt_PVMG && SvMAGIC(sv)) { (void)SvUPGRADE(value, SvTYPE(sv)); SvMAGIC(value) = SvMAGIC(sv); SvFLAGS(value) |= SvMAGICAL(sv); @@ -687,9 +685,7 @@ Perl_leave_scope(pTHX_ I32 base) * croaking that might ensue when the SvSETMAGIC() below is * called, or to avoid two different SVs pointing at the same * SvMAGIC()). This needs a total rethink. --GSAR */ - else if (SvTYPE(value) >= SVt_PVMG && SvMAGIC(value) && - SvTYPE(value) != SVt_PVGV) - { + else if (SvTYPE(value) == SVt_PVMG && SvMAGIC(value)) { SvFLAGS(value) |= (SvFLAGS(value) & (SVp_NOK|SVp_POK)) >> PRIVSHIFT; SvMAGICAL_off(value);