diff options
author | Salvador FandiƱo <sfandino@yahoo.com> | 2002-11-30 17:24:09 +0000 |
---|---|---|
committer | hv <hv@crypt.org> | 2003-02-16 13:55:10 +0000 |
commit | 06492da604676b8820ba5623ac813ceec4f48731 (patch) | |
tree | 51a6bda59973daccf9c0377e9639e90650598088 /cv.h | |
parent | ed25273444c5542e4865fbe422e026b78ba33b80 (diff) | |
download | perl-06492da604676b8820ba5623ac813ceec4f48731.tar.gz |
add support for assertions. Updated form of:
Subject: Re: Did the assertion patch/feature submission get overlooked?
Message-ID: <3DE8F439.50402@yahoo.com>
p4raw-id: //depot/perl@18727
Diffstat (limited to 'cv.h')
-rw-r--r-- | cv.h | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -82,9 +82,10 @@ Returns the stash of the CV. #define CVf_LVALUE 0x0100 /* CV return value can be used as lvalue */ #define CVf_CONST 0x0200 /* inlinable sub */ #define CVf_WEAKOUTSIDE 0x0400 /* CvOUTSIDE isn't ref counted */ +#define CVf_ASSERTION 0x0800 /* CV called only when asserting */ /* This symbol for optimised communication between toke.c and op.c: */ -#define CVf_BUILTIN_ATTRS (CVf_METHOD|CVf_LOCKED|CVf_LVALUE) +#define CVf_BUILTIN_ATTRS (CVf_METHOD|CVf_LOCKED|CVf_LVALUE|CVf_ASSERTION) #define CvCLONE(cv) (CvFLAGS(cv) & CVf_CLONE) #define CvCLONE_on(cv) (CvFLAGS(cv) |= CVf_CLONE) @@ -124,6 +125,10 @@ Returns the stash of the CV. #define CvLVALUE_on(cv) (CvFLAGS(cv) |= CVf_LVALUE) #define CvLVALUE_off(cv) (CvFLAGS(cv) &= ~CVf_LVALUE) +#define CvASSERTION(cv) (CvFLAGS(cv) & CVf_ASSERTION) +#define CvASSERTION_on(cv) (CvFLAGS(cv) |= CVf_ASSERTION) +#define CvASSERTION_off(cv) (CvFLAGS(cv) &= ~CVf_ASSERTION) + #define CvEVAL(cv) (CvUNIQUE(cv) && !SvFAKE(cv)) #define CvEVAL_on(cv) (CvUNIQUE_on(cv),SvFAKE_off(cv)) #define CvEVAL_off(cv) CvUNIQUE_off(cv) |