summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2011-02-06 21:13:11 +0000
committerDavid Mitchell <davem@iabyn.com>2011-02-06 21:34:44 +0000
commitf1a7609723ed7957eadf590a6ffbd7b77ff1d469 (patch)
tree1102bad4b53c5a70859965cbf7566cbf1c46967b /pp_hot.c
parentdd3f15c9a7d31e534b80c388d709c3722131d71e (diff)
downloadperl-f1a7609723ed7957eadf590a6ffbd7b77ff1d469.tar.gz
pp_subst: move a common block outside an if/then
The last few commits have been working towards making two blocks of code identical. Now it's payback time!
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c26
1 files changed, 8 insertions, 18 deletions
diff --git a/pp_hot.c b/pp_hot.c
index 941dd04d6f..66198a238b 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -2319,14 +2319,6 @@ PP(pp_subst)
else
mPUSHi((I32)iters);
}
- (void)SvPOK_only_UTF8(TARG);
- if (doutf8)
- SvUTF8_on(TARG);
- TAINT_IF(rxtainted);
- SvSETMAGIC(TARG);
- SvTAINT(TARG);
- LEAVE_SCOPE(oldsave);
- RETURN;
}
else {
if (force_on_match) {
@@ -2401,17 +2393,15 @@ PP(pp_subst)
PUSHs(TARG);
else
mPUSHi((I32)iters);
-
- (void)SvPOK_only_UTF8(TARG);
- if (doutf8)
- SvUTF8_on(TARG);
- TAINT_IF(rxtainted);
- SvSETMAGIC(TARG);
- SvTAINT(TARG);
- LEAVE_SCOPE(oldsave);
- RETURN;
}
- /* NOTREACHED */
+ (void)SvPOK_only_UTF8(TARG);
+ if (doutf8)
+ SvUTF8_on(TARG);
+ TAINT_IF(rxtainted);
+ SvSETMAGIC(TARG);
+ SvTAINT(TARG);
+ LEAVE_SCOPE(oldsave);
+ RETURN;
}
PP(pp_grepwhile)