summaryrefslogtreecommitdiff
path: root/av.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-10-27 21:23:04 +0000
committerNicholas Clark <nick@ccl4.org>2008-10-27 21:23:04 +0000
commita062e10d14f53c3718ae4dbf13be27233d85afcc (patch)
treec04ad988e99e4285aa0ab6aa2a785c66b96d6027 /av.h
parentfa89a9aebf1b4fa7904c5313f1e40c0db445379c (diff)
downloadperl-a062e10d14f53c3718ae4dbf13be27233d85afcc.tar.gz
Add MUTABLE_AV(), and remove (AV *) casts from headers.
p4raw-id: //depot/perl@34608
Diffstat (limited to 'av.h')
-rw-r--r--av.h4
1 files changed, 2 insertions, 2 deletions
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<av_len()>. Deprecated, use C<av_len()> 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: