summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-08-24 09:09:58 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-08-26 12:43:13 -0700
commitc72a562989087cf45b7abfdbbfb4a823adac1604 (patch)
treeee17c214b370828ec404011e889a3c7958aa632f /pp_ctl.c
parentd3e26383b699ba248aece0da481bcd07d3e4aa60 (diff)
downloadperl-c72a562989087cf45b7abfdbbfb4a823adac1604.tar.gz
&CORE::lock()
This commit allows &CORE::lock to be called through references and via ampersand syntax. It adds code to pp_coreargs for handling the OA_SCALARREF case, though what it adds is currently lock-specific. (Subsequent commits will address that.) Since lock returns the scalar passed to it, not a copy, &CORE::lock needs to use op_leavesublv, rather than op_leavesub. But it can’t be an lvalue sub, as &CORE::lock = 3 should be disallowed. So we use the sneaky trick of turning on the lvalue flag before attaching the op tree to the sub (which causes newATTRSUB to use op_leavesublv), and then turning it off afterwards.
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 76786c0508..971e78b451 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -2570,7 +2570,6 @@ PP(pp_leavesublv)
POPBLOCK(cx,newpm);
cxstack_ix++; /* temporarily protect top context */
- assert(CvLVALUE(cx->blk_sub.cv));
TAINT_NOT;