From beab0874143b7208922720fecefc4a224011fa25 Mon Sep 17 00:00:00 2001 From: John Tobey Date: Fri, 20 Oct 2000 18:03:27 -0400 Subject: Re: Creating const subs for constants. Message-Id: p4raw-id: //depot/perl@7389 --- cv.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'cv.h') 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) -- cgit v1.2.1