diff options
author | Father Chrysostomos <sprout@cpan.org> | 2014-10-31 14:54:20 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2014-11-13 04:49:36 -0800 |
commit | 72af0f205aa343252ed7cdba3f48ad1dad170ff6 (patch) | |
tree | 8e52adb1e2c90048bf629abb27795bd8d0726a92 /pad.h | |
parent | f928b3395fa5dd08d171fbedbbe170f38de76272 (diff) | |
download | perl-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.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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) |