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..)
case '.':
#ifndef lint
if (GvIO(PL_last_in_gv)) {
- sv_setiv(sv, (IV)IoLINES(GvIO(PL_last_in_gv)));
+ sv_setiv(sv, (IV)IoLINES(GvIOp(PL_last_in_gv)));
}
#endif
break;
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);
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");