summaryrefslogtreecommitdiff
path: root/av.c
diff options
context:
space:
mode:
authorAndy Lester <andy@petdance.com>2005-05-16 05:13:53 -0500
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-05-16 16:56:43 +0000
commita3b680e6b77dd7f88268fad8b1dbdf4f641dd836 (patch)
tree5b6dc5a60baf7a56b2db73bf0faffe0c3c44963c /av.c
parent02a44301bf4932369de0c75ad20a9c1256a455cd (diff)
downloadperl-a3b680e6b77dd7f88268fad8b1dbdf4f641dd836.tar.gz
consting-eleventy.patch: More consts, plus actual bug fix
Message-ID: <20050516151353.GA25387@petdance.com> p4raw-id: //depot/perl@24489
Diffstat (limited to 'av.c')
-rw-r--r--av.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/av.c b/av.c
index d3f17af3de..e7e4e5e047 100644
--- a/av.c
+++ b/av.c
@@ -487,8 +487,6 @@ Undefines the array. Frees the memory used by the array itself.
void
Perl_av_undef(pTHX_ register AV *av)
{
- register I32 key;
-
if (!av)
return;
/*SUPPRESS 560*/
@@ -498,7 +496,7 @@ Perl_av_undef(pTHX_ register AV *av)
av_fill(av, -1); /* mg_clear() ? */
if (AvREAL(av)) {
- key = AvFILLp(av) + 1;
+ register I32 key = AvFILLp(av) + 1;
while (key)
SvREFCNT_dec(AvARRAY(av)[--key]);
}
@@ -608,9 +606,7 @@ Perl_av_unshift(pTHX_ register AV *av, register I32 num)
{
dVAR;
register I32 i;
- register SV **ary;
MAGIC* mg;
- I32 slide;
if (!av)
return;
@@ -649,6 +645,8 @@ Perl_av_unshift(pTHX_ register AV *av, register I32 num)
SvPV_set(av, (char*)(AvARRAY(av) - i));
}
if (num) {
+ register SV **ary;
+ I32 slide;
i = AvFILLp(av);
/* Create extra elements */
slide = i > 0 ? i : 0;