summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorStephen McCamant <smcc@mit.edu>2001-01-10 13:36:51 -0800
committerJarkko Hietaniemi <jhi@iki.fi>2001-01-12 16:09:09 +0000
commitefc750f37d5333cdc32d5b28fde165292e7b9e32 (patch)
tree02808081953b524eb6a13bcb5ddba0e2a6e4666f /pp_ctl.c
parentf751ff97196083484296ee6146084b0ef99e9951 (diff)
downloadperl-efc750f37d5333cdc32d5b28fde165292e7b9e32.tar.gz
Consolidated lvalue sub changes
Message-ID: <14941.16925.736415.785818@soda.csua.berkeley.edu> p4raw-id: //depot/perl@8417
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 70c3ea3e73..07545dc28a 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -1240,6 +1240,20 @@ Perl_block_gimme(pTHX)
}
}
+I32
+Perl_is_lvalue_sub(pTHX)
+{
+ I32 cxix;
+
+ cxix = dopoptosub(cxstack_ix);
+ assert(cxix >= 0); /* We should only be called from inside subs */
+
+ if (cxstack[cxix].blk_sub.lval && CvLVALUE(cxstack[cxix].blk_sub.cv))
+ return cxstack[cxix].blk_sub.lval;
+ else
+ return 0;
+}
+
STATIC I32
S_dopoptosub(pTHX_ I32 startingblock)
{