From: Malcolm Beattie Date: Tue, 25 Nov 1997 14:17:05 +0000 (+0000) Subject: Fix scalar dereference of threadsv variables (e.g. $$_). X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=224a4551e7f27de6b7a1345be75f3d54c3df10a8;p=p5sagit%2Fp5-mst-13.2.git Fix scalar dereference of threadsv variables (e.g. $$_). p4raw-id: //depot/perl@291 --- diff --git a/op.c b/op.c index dd4c5ac..0024f2b 100644 --- a/op.c +++ b/op.c @@ -3740,8 +3740,10 @@ newSVREF(OP *o) o->op_ppaddr = ppaddr[OP_PADSV]; return o; } - else if (o->op_type == OP_THREADSV) + else if (o->op_type == OP_THREADSV && !(o->op_flags & OPpDONE_SVREF)) { + o->op_flags |= OPpDONE_SVREF; return o; + } return newUNOP(OP_RV2SV, 0, scalar(o)); } diff --git a/op.h b/op.h index e3d3f3d..fbb5b8c 100644 --- a/op.h +++ b/op.h @@ -131,8 +131,8 @@ typedef U32 PADOFFSET; /* Private for OP_SORT, OP_PRTF, OP_SPRINTF, string cmp'n, and case changers */ #define OPpLOCALE 64 /* Use locale */ -/* Private for OP_SPECIFIC */ -#define OPpPM_NOT_CONST 64 /* Not constant enough for pmruntime */ +/* Private for OP_THREADSV */ +#define OPpDONE_SVREF 64 /* Been through newSVREF once */ struct op { BASEOP