From a062e10d14f53c3718ae4dbf13be27233d85afcc Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Mon, 27 Oct 2008 21:23:04 +0000 Subject: Add MUTABLE_AV(), and remove (AV *) casts from headers. p4raw-id: //depot/perl@34608 --- av.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'av.h') diff --git a/av.h b/av.h index c48df390c7..77df033dc7 100644 --- a/av.h +++ b/av.h @@ -75,7 +75,7 @@ Same as C. Deprecated, use C instead. #define AvALLOC(av) (*((SV***)&((XPVAV*) SvANY(av))->xav_alloc)) #define AvMAX(av) ((XPVAV*) SvANY(av))->xav_max #define AvFILLp(av) ((XPVAV*) SvANY(av))->xav_fill -#define AvARYLEN(av) (*Perl_av_arylen_p(aTHX_ (AV*)av)) +#define AvARYLEN(av) (*Perl_av_arylen_p(aTHX_ MUTABLE_AV(av))) #define AvREAL(av) (SvFLAGS(av) & SVpav_REAL) #define AvREAL_on(av) (SvFLAGS(av) |= SVpav_REAL) @@ -101,7 +101,7 @@ Creates a new AV. The reference count is set to 1. =cut */ -#define newAV() ((AV *)newSV_type(SVt_PVAV)) +#define newAV() MUTABLE_AV(newSV_type(SVt_PVAV)) /* * Local variables: -- cgit v1.2.1