summaryrefslogtreecommitdiff
path: root/pad.h
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2014-10-31 14:54:20 -0700
committerFather Chrysostomos <sprout@cpan.org>2014-11-13 04:49:36 -0800
commit72af0f205aa343252ed7cdba3f48ad1dad170ff6 (patch)
tree8e52adb1e2c90048bf629abb27795bd8d0726a92 /pad.h
parentf928b3395fa5dd08d171fbedbbe170f38de76272 (diff)
downloadperl-72af0f205aa343252ed7cdba3f48ad1dad170ff6.tar.gz
Add new LVALUE flag for pad names
This will be used to record whether a pad entry is used as an lvalue multiple times. If so, it cannot be used as a constant.
Diffstat (limited to 'pad.h')
-rw-r--r--pad.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/pad.h b/pad.h
index d800b19318..3ca79d342a 100644
--- a/pad.h
+++ b/pad.h
@@ -301,7 +301,10 @@ Restore the old pad saved into the local variable opad by PAD_SAVE_LOCAL()
#define PadnameOUTER(pn) !!SvFAKE(pn)
#define PadnameIsSTATE(pn) !!SvPAD_STATE(pn)
#define PadnameTYPE(pn) (SvPAD_TYPED(pn) ? SvSTASH(pn) : NULL)
+#define PadnameLVALUE(pn) \
+ ((SvFLAGS(pn) & (SVpad_NAME|SVpad_LVALUE))==(SVpad_NAME|SVpad_LVALUE))
+#define PadnameLVALUE_on(pn) (SvFLAGS(pn) |= SVpad_NAME|SVpad_LVALUE)
#ifdef DEBUGGING
# define PAD_SV(po) pad_sv(po)