diff options
author | Ben Morrow <ben@morrow.me.uk> | 2008-06-28 18:00:17 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2008-09-04 15:33:04 +0000 |
commit | 69fa774e2f115dd855ae865a2677486ea5db1e39 (patch) | |
tree | 043493601285f964c6cc4d595f45cad242661a2a /pp.c | |
parent | 332590faebd348afd7b4fd87bbc752be9df9db32 (diff) | |
download | perl-69fa774e2f115dd855ae865a2677486ea5db1e39.tar.gz |
Integrate:
[ 34092]
Subject: Some more missing isGV_with_GP()s
Message-ID: <20080628160017.GA81579@osiris.mauzo.dyndns.org>
[ 34100]
Fix test count that was missed in #34092
[ 34101]
Skip chown() tests added by #34092 on Win32
p4raw-link: @34101 on //depot/perl: ab14db95b0de89c4e67326bde2652b72e8b65f0d
p4raw-link: @34100 on //depot/perl: a782d47cad865bb210f954af0329b9058a215340
p4raw-link: @34092 on //depot/perl: 6e592b3a92f7ee35c9a857bd9a43297ab1693599
p4raw-id: //depot/maint-5.10/perl@34266
p4raw-branched: from //depot/perl@34265 'branch in' t/io/pvbm.t
(@34092..)
p4raw-integrated: from //depot/perl@34265 'copy in' ext/IO/t/io_taint.t
(@27609..) t/op/attrs.t (@31333..) 'edit in' t/op/inc.t
(@33049..) 'merge in' doio.c (@33766..) pp_sys.c (@33770..)
pp_hot.c (@33778..) mg.c (@33898..) xsutils.c (@33901..) pp.c
(@33981..)
p4raw-integrated: from //depot/perl@34092 'copy in' t/op/undef.t
(@19424..) t/op/inccode.t (@30600..) t/op/ref.t (@30915..)
'ignore' t/op/magic.t (@31809..) 'merge in' MANIFEST (@34001..)
pp_ctl.c (@34069..) sv.c (@34084..)
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 21 |
1 files changed, 12 insertions, 9 deletions
@@ -143,11 +143,11 @@ PP(pp_rv2gv) SvREFCNT_inc_void_NN(sv); sv = (SV*) gv; } - else if (SvTYPE(sv) != SVt_PVGV) + else if (!isGV_with_GP(sv)) DIE(aTHX_ "Not a GLOB reference"); } else { - if (SvTYPE(sv) != SVt_PVGV) { + if (!isGV_with_GP(sv)) { if (SvGMAGICAL(sv)) { mg_get(sv); if (SvROK(sv)) @@ -289,7 +289,7 @@ PP(pp_rv2sv) else { gv = (GV*)sv; - if (SvTYPE(gv) != SVt_PVGV) { + if (!isGV_with_GP(gv)) { if (SvGMAGICAL(sv)) { mg_get(sv); if (SvROK(sv)) @@ -824,9 +824,11 @@ PP(pp_undef) } break; case SVt_PVGV: - if (SvFAKE(sv)) + if (SvFAKE(sv)) { SvSetMagicSV(sv, &PL_sv_undef); - else { + break; + } + else if (isGV_with_GP(sv)) { GP *gp; HV *stash; @@ -844,8 +846,9 @@ PP(pp_undef) GvLINE(sv) = CopLINE(PL_curcop); GvEGV(sv) = (GV*)sv; GvMULTI_on(sv); + break; } - break; + /* FALL THROUGH */ default: if (SvTYPE(sv) >= SVt_PV && SvPVX_const(sv) && SvLEN(sv)) { SvPV_free(sv); @@ -862,7 +865,7 @@ PP(pp_undef) PP(pp_predec) { dVAR; dSP; - if (SvTYPE(TOPs) >= SVt_PVGV && SvTYPE(TOPs) != SVt_PVLV) + if (SvTYPE(TOPs) >= SVt_PVAV || isGV_with_GP(TOPs)) DIE(aTHX_ PL_no_modify); if (!SvREADONLY(TOPs) && SvIOK_notUV(TOPs) && !SvNOK(TOPs) && !SvPOK(TOPs) && SvIVX(TOPs) != IV_MIN) @@ -879,7 +882,7 @@ PP(pp_predec) PP(pp_postinc) { dVAR; dSP; dTARGET; - if (SvTYPE(TOPs) >= SVt_PVGV && SvTYPE(TOPs) != SVt_PVLV) + if (SvTYPE(TOPs) >= SVt_PVAV || isGV_with_GP(TOPs)) DIE(aTHX_ PL_no_modify); sv_setsv(TARG, TOPs); if (!SvREADONLY(TOPs) && SvIOK_notUV(TOPs) && !SvNOK(TOPs) && !SvPOK(TOPs) @@ -901,7 +904,7 @@ PP(pp_postinc) PP(pp_postdec) { dVAR; dSP; dTARGET; - if (SvTYPE(TOPs) >= SVt_PVGV && SvTYPE(TOPs) != SVt_PVLV) + if (SvTYPE(TOPs) >= SVt_PVAV || isGV_with_GP(TOPs)) DIE(aTHX_ PL_no_modify); sv_setsv(TARG, TOPs); if (!SvREADONLY(TOPs) && SvIOK_notUV(TOPs) && !SvNOK(TOPs) && !SvPOK(TOPs) |