summaryrefslogtreecommitdiff
path: root/cv.h
diff options
context:
space:
mode:
authorJohn Tobey <jtobey@john-edwin-tobey.org>2000-10-20 18:03:27 -0400
committerJarkko Hietaniemi <jhi@iki.fi>2000-10-21 14:26:45 +0000
commitbeab0874143b7208922720fecefc4a224011fa25 (patch)
tree3abffe8c491d477f0bb7cd037866ba7485ef9ee5 /cv.h
parent3a67c0c7529c0500df7fe90b2c6269508a51be07 (diff)
downloadperl-beab0874143b7208922720fecefc4a224011fa25.tar.gz
Re: Creating const subs for constants.
Message-Id: <m13mo0N-000FObC@feynman.localnet> p4raw-id: //depot/perl@7389
Diffstat (limited to 'cv.h')
-rw-r--r--cv.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/cv.h b/cv.h
index adb424e8ea..6fa1f4fe8d 100644
--- a/cv.h
+++ b/cv.h
@@ -75,6 +75,7 @@ Returns the stash of the CV.
#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 CVf_CONST 0x0200 /* inlinable sub */
#define CvCLONE(cv) (CvFLAGS(cv) & CVf_CLONE)
#define CvCLONE_on(cv) (CvFLAGS(cv) |= CVf_CLONE)
@@ -122,3 +123,7 @@ Returns the stash of the CV.
#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))
+
+#define CvCONST(cv) (CvFLAGS(cv) & CVf_CONST)
+#define CvCONST_on(cv) (CvFLAGS(cv) |= CVf_CONST)
+#define CvCONST_off(cv) (CvFLAGS(cv) &= ~CVf_CONST)