diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-09-05 22:07:18 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-09-05 22:07:18 +0000 |
commit | cd06dffe59d60ee6a2fdd7c81f8cef42c7026b36 (patch) | |
tree | bf5d5d4e9d1c11e7d63fd97ce74470e8bedc88d3 /cv.h | |
parent | a2126434f8dd8eabb11a2219137816815758ea93 (diff) | |
download | perl-cd06dffe59d60ee6a2fdd7c81f8cef42c7026b36.tar.gz |
initial implementation of lvalue subroutines (slightly fixed
version of patch suggested by Ilya Zakharevich, which in turn
is based on the one suggested by Tuomas J. Lukka <lukka@iki.fi>)
p4raw-id: //depot/perl@4081
Diffstat (limited to 'cv.h')
-rw-r--r-- | cv.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -62,6 +62,7 @@ struct xpvcv { (esp. useful for special XSUBs) */ #define CVf_METHOD 0x0040 /* CV is explicitly marked as a method */ #define CVf_LOCKED 0x0080 /* CV locks itself or first arg on entry */ +#define CVf_LVALUE 0x0100 /* CV return value can be used as lvalue */ #define CvCLONE(cv) (CvFLAGS(cv) & CVf_CLONE) #define CvCLONE_on(cv) (CvFLAGS(cv) |= CVf_CLONE) @@ -97,6 +98,10 @@ struct xpvcv { #define CvLOCKED_on(cv) (CvFLAGS(cv) |= CVf_LOCKED) #define CvLOCKED_off(cv) (CvFLAGS(cv) &= ~CVf_LOCKED) +#define CvLVALUE(cv) (CvFLAGS(cv) & CVf_LVALUE) +#define CvLVALUE_on(cv) (CvFLAGS(cv) |= CVf_LVALUE) +#define CvLVALUE_off(cv) (CvFLAGS(cv) &= ~CVf_LVALUE) + #define CvEVAL(cv) (CvUNIQUE(cv) && !SvFAKE(cv)) #define CvEVAL_on(cv) (CvUNIQUE_on(cv),SvFAKE_off(cv)) #define CvEVAL_off(cv) CvUNIQUE_off(cv) |