diff options
author | Andy Lester <andy@petdance.com> | 2005-05-16 05:13:53 -0500 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-05-16 16:56:43 +0000 |
commit | a3b680e6b77dd7f88268fad8b1dbdf4f641dd836 (patch) | |
tree | 5b6dc5a60baf7a56b2db73bf0faffe0c3c44963c /av.c | |
parent | 02a44301bf4932369de0c75ad20a9c1256a455cd (diff) | |
download | perl-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.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -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; |