summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--op.c4
-rw-r--r--op.h4
2 files changed, 5 insertions, 3 deletions
diff --git a/op.c b/op.c
index dd4c5acd48..0024f2b781 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 e3d3f3d93e..fbb5b8c8dd 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