summaryrefslogtreecommitdiff
path: root/pad.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-02-25 16:56:53 +0000
committerNicholas Clark <nick@ccl4.org>2010-05-24 15:50:57 +0100
commit4cee4ca8b28e9dadc530df8ce100439bc4a78e73 (patch)
treee0ef80a825df63a700fc5644842ce8cc7befc499 /pad.c
parent6de654a5795b6f7915432ff16bcdac0688492a9b (diff)
downloadperl-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.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/pad.c b/pad.c
index c7a18c2211..207f475afd 100644
--- a/pad.c
+++ b/pad.c
@@ -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);
}