X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=cv.h;h=74e2adec8d4320d061cf23506aad1a9a03b59643;hb=ca9279baf07d6843f58a31f1ce3ff7dc875faf1a;hp=6e471413ff92c4fd660d058005c79730c73d5792;hpb=b84cd2cbc1e1e5656828228b9350e1406e9c3890;p=p5sagit%2Fp5-mst-13.2.git diff --git a/cv.h b/cv.h index 6e47141..74e2ade 100644 --- a/cv.h +++ b/cv.h @@ -1,13 +1,14 @@ /* cv.h * - * Copyright (c) 1991-2002, Larry Wall + * Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1999, + * 2000, 2001, 2002, 2003, by Larry Wall and others * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. * */ -/* This structure much match XPVCV in B/C.pm and the beginning of XPVFM +/* This structure must match XPVCV in B/C.pm and the beginning of XPVFM * in sv.h */ struct xpvcv { @@ -82,9 +83,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 +126,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)