summaryrefslogtreecommitdiff
path: root/mg.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 /mg.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 'mg.c')
-rw-r--r--mg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mg.c b/mg.c
index b34257df0e..643ec7e779 100644
--- a/mg.c
+++ b/mg.c
@@ -1895,7 +1895,7 @@ int
Perl_magic_getarylen(pTHX_ SV *sv, const MAGIC *mg)
{
dVAR;
- const AV * const obj = (AV*)mg->mg_obj;
+ AV * const obj = (AV*)mg->mg_obj;
PERL_ARGS_ASSERT_MAGIC_GETARYLEN;