diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-05-14 15:20:58 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-05-14 15:20:58 +0000 |
commit | 357c88086d7fbc4a100250293365f8373201add6 (patch) | |
tree | 6d6f81aa7a40e399858344bd6b6bf14d262a18d2 /pp_ctl.c | |
parent | 03739d21c9232cc6b91282bb1936392275192e80 (diff) | |
download | perl-357c88086d7fbc4a100250293365f8373201add6.tar.gz |
Integrate change #10100 from maintperl.
PL_last_in_gv may not be a GV if it was a stale filehandle (fix for
bug ID 20010514.027)
p4raw-link: @10100 on //depot/maint-5.6/perl: 5244397c028305e17ca4ad7e80cf900323dbeb8b
p4raw-id: //depot/perl@10103
p4raw-integrated: from //depot/maint-5.6/perl@10102 'merge in' mg.c
(@9288..) pp_ctl.c (@9584..)
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1079,7 +1079,7 @@ PP(pp_flip) if (PL_op->op_private & OPpFLIP_LINENUM) { struct io *gp_io; flip = PL_last_in_gv - && (gp_io = GvIOp(PL_last_in_gv)) + && (gp_io = GvIO(PL_last_in_gv)) && SvIV(sv) == (IV)IoLINES(gp_io); } else { flip = SvTRUE(sv); @@ -1160,7 +1160,8 @@ PP(pp_flop) SV *targ = PAD_SV(cUNOP->op_first->op_targ); sv_inc(targ); if ((PL_op->op_private & OPpFLIP_LINENUM) - ? (PL_last_in_gv && SvIV(sv) == (IV)IoLINES(GvIOp(PL_last_in_gv))) + ? (GvIO(PL_last_in_gv) + && SvIV(sv) == (IV)IoLINES(GvIOp(PL_last_in_gv))) : SvTRUE(sv) ) { sv_setiv(PAD_SV(((UNOP*)cUNOP->op_first)->op_first->op_targ), 0); sv_catpv(targ, "E0"); |