diff options
author | Andy Lester <andy@petdance.com> | 2005-05-21 04:06:40 -0500 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-05-24 12:33:01 +0000 |
commit | 504618e92cbf415cc727244b0e64aab9ddfb1c10 (patch) | |
tree | 013cc7cb013c430f1c256b1dd1109b8b82da0241 /pad.c | |
parent | 3480a8d2d46562b783befbcecf951d5a2b4067d7 (diff) | |
download | perl-504618e92cbf415cc727244b0e64aab9ddfb1c10.tar.gz |
embed.fnc cleanup + SvPVX_const usage
Message-ID: <20050521140640.GB875@petdance.com>
p4raw-id: //depot/perl@24561
Diffstat (limited to 'pad.c')
-rw-r--r-- | pad.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -255,7 +255,7 @@ Perl_pad_undef(pTHX_ CV* cv) AV *comppad = (AV*)AvARRAY(padlist)[1]; SV **curpad = AvARRAY(comppad); for (ix = AvFILLp(comppad_name); ix > 0; ix--) { - SV *namesv = namepad[ix]; + SV * const namesv = namepad[ix]; if (namesv && namesv != &PL_sv_undef && *SvPVX_const(namesv) == '&') { @@ -329,7 +329,7 @@ If fake, it means we're cloning an existing entry PADOFFSET Perl_pad_add_name(pTHX_ const char *name, HV* typestash, HV* ourstash, bool fake) { - PADOFFSET offset = pad_alloc(OP_PADSV, SVs_PADMY); + const PADOFFSET offset = pad_alloc(OP_PADSV, SVs_PADMY); SV* namesv = NEWSV(1102, 0); ASSERT_CURPAD_ACTIVE("pad_add_name"); @@ -1123,7 +1123,6 @@ void Perl_pad_tidy(pTHX_ padtidy_type type) { dVAR; - PADOFFSET ix; ASSERT_CURPAD_ACTIVE("pad_tidy"); @@ -1155,6 +1154,7 @@ Perl_pad_tidy(pTHX_ padtidy_type type) if (type == padtidy_SUBCLONE) { SV **namep = AvARRAY(PL_comppad_name); + PADOFFSET ix; for (ix = AvFILLp(PL_comppad); ix > 0; ix--) { SV *namesv; @@ -1186,6 +1186,7 @@ Perl_pad_tidy(pTHX_ padtidy_type type) /* XXX DAPM rationalise these two similar branches */ if (type == padtidy_SUB) { + PADOFFSET ix; for (ix = AvFILLp(PL_comppad); ix > 0; ix--) { if (SvIMMORTAL(PL_curpad[ix]) || IS_PADGV(PL_curpad[ix]) || IS_PADCONST(PL_curpad[ix])) continue; @@ -1194,6 +1195,7 @@ Perl_pad_tidy(pTHX_ padtidy_type type) } } else if (type == padtidy_FORMAT) { + PADOFFSET ix; for (ix = AvFILLp(PL_comppad); ix > 0; ix--) { if (!SvPADMY(PL_curpad[ix]) && !SvIMMORTAL(PL_curpad[ix])) SvPADTMP_on(PL_curpad[ix]); |