summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-11-25 15:42:07 +0000
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-11-25 15:42:07 +0000
commit48bfcc53740a66ec5a66616b846e1db9955c1c69 (patch)
tree2de7728957d83a013605f4f68638b4bbef4565a2 /op.c
parentfd206186f8bcdcb1b41bbddfb851c60acb937fcd (diff)
parentd40103885dfef00fdafa10024e6e4d5e414d1403 (diff)
downloadperl-48bfcc53740a66ec5a66616b846e1db9955c1c69.tar.gz
Integrate from ansi branch to mainline.
p4raw-id: //depot/perl@296
Diffstat (limited to 'op.c')
-rw-r--r--op.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/op.c b/op.c
index 0024f2b781..6c29226e6b 100644
--- a/op.c
+++ b/op.c
@@ -3438,9 +3438,9 @@ newSUB(I32 floor, OP *o, OP *proto, OP *block)
CV *cv;
HV *hv;
- sv_setpvf(sv, "%_:%ld-%ld",
- GvSV(curcop->cop_filegv),
- (long)subline, (long)curcop->cop_line);
+ sv_setpvf(sv, "%_:%ld-%ld", GvSV(curcop->cop_filegv),
+ (long)(subline < 0 ? -subline : subline),
+ (long)curcop->cop_line);
gv_efullname3(tmpstr, gv, Nullch);
hv_store(GvHV(DBsub), SvPVX(tmpstr), SvCUR(tmpstr), sv, 0);
if (!db_postponed) {
@@ -4414,7 +4414,7 @@ ck_shift(OP *o)
op_free(o);
#ifdef USE_THREADS
- if (subline) {
+ if (subline > 0) {
argop = newOP(OP_PADAV, OPf_REF);
argop->op_targ = 0; /* curpad[0] is @_ */
}
@@ -4425,7 +4425,7 @@ ck_shift(OP *o)
}
#else
argop = newUNOP(OP_RV2AV, 0,
- scalar(newGVOP(OP_GV, 0, subline ?
+ scalar(newGVOP(OP_GV, 0, subline > 0 ?
defgv : gv_fetchpv("ARGV", TRUE, SVt_PVAV))));
#endif /* USE_THREADS */
return newUNOP(type, 0, scalar(argop));