diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-05-20 21:11:52 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-05-20 21:11:52 +0000 |
commit | 11ca45c0440b891278a1e7129025dd5644026556 (patch) | |
tree | 9091ca5bf20af6659e0e73384a258d5ac3ddbb3d /av.h | |
parent | 7596a890808c68b396a85f42b3695b1e97cbe208 (diff) | |
download | perl-11ca45c0440b891278a1e7129025dd5644026556.tar.gz |
Goodbye AvFLAGS
p4raw-id: //depot/perl@24518
Diffstat (limited to 'av.h')
-rw-r--r-- | av.h | 26 |
1 files changed, 9 insertions, 17 deletions
@@ -19,7 +19,6 @@ struct xpvav { SV** xav_alloc; /* pointer to beginning of C array of SVs */ SV* xav_arylen; - U8 xav_flags; }; @@ -40,11 +39,6 @@ struct xpvav { * manipulations external to perl should not care about any of this. * GSAR 1999-09-10 */ -#define AVf_REAL 1 /* free old entries */ -#define AVf_REIFY 2 /* can become real */ - -/* XXX this is not used anywhere */ -#define AVf_REUSED 4 /* got undeffed--don't turn old memory into SVs now */ /* =head1 Handy Values @@ -67,19 +61,17 @@ Same as C<av_len()>. Deprecated, use C<av_len()> instead. #define AvMAX(av) ((XPVAV*) SvANY(av))->xav_max #define AvFILLp(av) ((XPVAV*) SvANY(av))->xav_fill #define AvARYLEN(av) ((XPVAV*) SvANY(av))->xav_arylen -#define AvFLAGS(av) ((XPVAV*) SvANY(av))->xav_flags -#define AvREAL(av) (AvFLAGS(av) & AVf_REAL) -#define AvREAL_on(av) (AvFLAGS(av) |= AVf_REAL) -#define AvREAL_off(av) (AvFLAGS(av) &= ~AVf_REAL) -#define AvREIFY(av) (AvFLAGS(av) & AVf_REIFY) -#define AvREIFY_on(av) (AvFLAGS(av) |= AVf_REIFY) -#define AvREIFY_off(av) (AvFLAGS(av) &= ~AVf_REIFY) -#define AvREUSED(av) (AvFLAGS(av) & AVf_REUSED) -#define AvREUSED_on(av) (AvFLAGS(av) |= AVf_REUSED) -#define AvREUSED_off(av) (AvFLAGS(av) &= ~AVf_REUSED) +#define AvREAL(av) (SvFLAGS(av) & SVpav_REAL) +#define AvREAL_on(av) (SvFLAGS(av) |= SVpav_REAL) +#define AvREAL_off(av) (SvFLAGS(av) &= ~SVpav_REAL) +#define AvREAL_only(av) (AvREIFY_off(av), SvFLAGS(av) |= SVpav_REAL) +#define AvREIFY(av) (SvFLAGS(av) & SVpav_REIFY) +#define AvREIFY_on(av) (SvFLAGS(av) |= SVpav_REIFY) +#define AvREIFY_off(av) (SvFLAGS(av) &= ~SVpav_REIFY) +#define AvREIFY_only(av) (AvREAL_off(av), SvFLAGS(av) |= SVpav_REIFY) -#define AvREALISH(av) (AvFLAGS(av) & (AVf_REAL|AVf_REIFY)) +#define AvREALISH(av) (SvFLAGS(av) & (SVpav_REAL|SVpav_REIFY)) #define AvFILL(av) ((SvRMAGICAL((SV *) (av))) \ ? mg_size((SV *) av) : AvFILLp(av)) |