summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-11-25 14:17:05 +0000
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-11-25 14:17:05 +0000
commit224a4551e7f27de6b7a1345be75f3d54c3df10a8 (patch)
treeb2aeb699daed73d9e8d67cdf15fb77c852377223 /op.c
parent52e1cb5ebf5e5a8cd5d3d9673b540b0c0dfe20df (diff)
downloadperl-224a4551e7f27de6b7a1345be75f3d54c3df10a8.tar.gz
Fix scalar dereference of threadsv variables (e.g. $$_).
p4raw-id: //depot/perl@291
Diffstat (limited to 'op.c')
-rw-r--r--op.c4
1 files changed, 3 insertions, 1 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));
}