summaryrefslogtreecommitdiff
path: root/cv.h
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-02-18 21:41:57 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-02-18 21:41:57 +0000
commit1aff0e911b5282f0638dc0d8199ffa4edf98f89c (patch)
tree739e6a5e7e8b085c24d38adf5e1dcd0975de78da /cv.h
parent08cdc9a35d157219f769511762b78adf22ca040a (diff)
downloadperl-1aff0e911b5282f0638dc0d8199ffa4edf98f89c.tar.gz
distinguish eval'' from BEGIN|INIT|END CVs (fixes buggy propagation
of lexical searches in BEGIN|INIT|END) p4raw-id: //depot/perl@2975
Diffstat (limited to 'cv.h')
-rw-r--r--cv.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/cv.h b/cv.h
index c7c7a73cc5..0d31a44e36 100644
--- a/cv.h
+++ b/cv.h
@@ -94,3 +94,12 @@ struct xpvcv {
#define CvLOCKED(cv) (CvFLAGS(cv) & CVf_LOCKED)
#define CvLOCKED_on(cv) (CvFLAGS(cv) |= CVf_LOCKED)
#define CvLOCKED_off(cv) (CvFLAGS(cv) &= ~CVf_LOCKED)
+
+#define CvEVAL(cv) (CvUNIQUE(cv) && !SvFAKE(cv))
+#define CvEVAL_on(cv) (CvUNIQUE_on(cv),SvFAKE_off(cv))
+#define CvEVAL_off(cv) CvUNIQUE_off(cv)
+
+/* BEGIN|INIT|END */
+#define CvSPECIAL(cv) (CvUNIQUE(cv) && SvFAKE(cv))
+#define CvSPECIAL_on(cv) (CvUNIQUE_on(cv),SvFAKE_on(cv))
+#define CvSPECIAL_off(cv) (CvUNIQUE_off(cv),SvFAKE_off(cv))