summaryrefslogtreecommitdiff
path: root/av.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-10-27 20:22:36 +0000
committerNicholas Clark <nick@ccl4.org>2008-10-27 20:22:36 +0000
commitbb5dd93d07e2d54d352e519c7b43ff2d3e5c5f36 (patch)
treef3ca3569240799f160f6b783bb23c8e35602b4d2 /av.c
parent159e8d64637a3daadcbab30870860babbbe8e1c1 (diff)
downloadperl-bb5dd93d07e2d54d352e519c7b43ff2d3e5c5f36.tar.gz
Bugs revealed by replacing (SV *) casts with something that doesn't
cast away const - AvFILL() doesn't guarantee that it won't modify the AV * passed to it. So the prototype for Perl_av_len() needs to change, and a const needs to go in Perl_magic_setarraylen(). p4raw-id: //depot/perl@34604
Diffstat (limited to 'av.c')
-rw-r--r--av.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/av.c b/av.c
index b2c1aae542..a31a8be526 100644
--- a/av.c
+++ b/av.c
@@ -758,7 +758,7 @@ array is C<av_len(av) + 1>. Returns -1 if the array is empty.
*/
I32
-Perl_av_len(pTHX_ register const AV *av)
+Perl_av_len(pTHX_ AV *av)
{
PERL_ARGS_ASSERT_AV_LEN;
assert(SvTYPE(av) == SVt_PVAV);