summaryrefslogtreecommitdiff
path: root/sv.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 /sv.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 'sv.h')
-rw-r--r--sv.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sv.h b/sv.h
index bb3d57296a..6c77cceff1 100644
--- a/sv.h
+++ b/sv.h
@@ -380,6 +380,7 @@ perform the upgrade if necessary. See C<svtype>.
#define SVpad_OUR 0x00040000 /* pad name is "our" instead of "my" */
#define SVs_TEMP 0x00080000 /* mortal (implies string is stealable) */
#define SVs_OBJECT 0x00100000 /* is "blessed" */
+#define SVpad_LVALUE 0x00100000 /* pad name is used as lvalue */
#define SVs_GMG 0x00200000 /* has magical get method */
#define SVs_SMG 0x00400000 /* has magical set method */
#define SVs_RMG 0x00800000 /* has random magical methods */
@@ -1143,6 +1144,7 @@ sv_force_normal does nothing.
#define SvTAIL_on(sv) (SvFLAGS(sv) |= SVpbm_TAIL)
#define SvTAIL_off(sv) (SvFLAGS(sv) &= ~SVpbm_TAIL)
+#define SvPAD_NAME(sv) ((SvFLAGS(sv) & SVpad_NAME) == SVpad_NAME)
#define SvPAD_TYPED(sv) \
((SvFLAGS(sv) & (SVpad_NAME|SVpad_TYPED)) == (SVpad_NAME|SVpad_TYPED))