diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-08-24 09:09:58 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-08-26 12:43:13 -0700 |
commit | c72a562989087cf45b7abfdbbfb4a823adac1604 (patch) | |
tree | ee17c214b370828ec404011e889a3c7958aa632f /pp_ctl.c | |
parent | d3e26383b699ba248aece0da481bcd07d3e4aa60 (diff) | |
download | perl-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.c | 1 |
1 files changed, 0 insertions, 1 deletions
@@ -2570,7 +2570,6 @@ PP(pp_leavesublv) POPBLOCK(cx,newpm); cxstack_ix++; /* temporarily protect top context */ - assert(CvLVALUE(cx->blk_sub.cv)); TAINT_NOT; |