From: Gurusamy Sarathy Date: Thu, 6 May 1999 01:56:06 +0000 (+0000) Subject: fix bogus OPf_REF context in C (extension of X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=82092f1dcd6e496644fe74540fa706cb390be431;p=p5sagit%2Fp5-mst-13.2.git fix bogus OPf_REF context in C (extension of change#3180) p4raw-link: @3180 on //depot/perl: fd3835b3e90ede5576a7ad392beef86bf933ce15 p4raw-id: //depot/perl@3307 --- diff --git a/op.c b/op.c index 635a04a..2b6107e 100644 --- a/op.c +++ b/op.c @@ -4306,7 +4306,7 @@ newAVREF(OP *o) OP * newGVREF(I32 type, OP *o) { - if (type == OP_MAPSTART || type == OP_GREPSTART) + if (type == OP_MAPSTART || type == OP_GREPSTART || type == OP_SORT) return newUNOP(OP_NULL, 0, o); return ref(newUNOP(OP_RV2GV, OPf_REF, o), type); } @@ -5119,7 +5119,7 @@ ck_sort(OP *o) if (o->op_flags & OPf_STACKED) { /* may have been cleared */ OP *kid = cLISTOPo->op_first->op_sibling; /* get past pushmark */ OP *k; - kid = kUNOP->op_first; /* get past rv2gv */ + kid = kUNOP->op_first; /* get past null */ if (kid->op_type == OP_SCOPE || kid->op_type == OP_LEAVE) { linklist(kid); @@ -5144,7 +5144,6 @@ ck_sort(OP *o) peep(k); kid = cLISTOPo->op_first->op_sibling; /* get past pushmark */ - null(kid); /* wipe out rv2gv */ if (o->op_type == OP_SORT) kid->op_next = kid; else @@ -5169,7 +5168,7 @@ simplify_sort(OP *o) return; GvMULTI_on(gv_fetchpv("a", TRUE, SVt_PV)); GvMULTI_on(gv_fetchpv("b", TRUE, SVt_PV)); - kid = kUNOP->op_first; /* get past rv2gv */ + kid = kUNOP->op_first; /* get past null */ if (kid->op_type != OP_SCOPE) return; kid = kLISTOP->op_last; /* get past scope */