diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-02-25 16:56:53 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-05-24 15:50:57 +0100 |
commit | 4cee4ca8b28e9dadc530df8ce100439bc4a78e73 (patch) | |
tree | e0ef80a825df63a700fc5644842ce8cc7befc499 /pad.c | |
parent | 6de654a5795b6f7915432ff16bcdac0688492a9b (diff) | |
download | perl-4cee4ca8b28e9dadc530df8ce100439bc4a78e73.tar.gz |
In Perl_pad_tidy(), merge the SvPADTMP_on() loops for padtidy_SUB and _FORMAT.
Diffstat (limited to 'pad.c')
-rw-r--r-- | pad.c | 11 |
1 files changed, 1 insertions, 10 deletions
@@ -1304,9 +1304,7 @@ Perl_pad_tidy(pTHX_ padtidy_type type) AvREIFY_only(av); } - /* XXX DAPM rationalise these two similar branches */ - - if (type == padtidy_SUB) { + if (type == padtidy_SUB || type == padtidy_FORMAT) { 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])) @@ -1315,13 +1313,6 @@ Perl_pad_tidy(pTHX_ padtidy_type type) SvPADTMP_on(PL_curpad[ix]); } } - 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]); - } - } PL_curpad = AvARRAY(PL_comppad); } |