summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2012-09-01 11:23:58 +0100
committerDavid Mitchell <davem@iabyn.com>2012-09-08 15:42:07 +0100
commitfbfb1899dd79253696b441cc1c4968a1057c2574 (patch)
tree18d46c1a1e09a03ef638b31bff844f3004fca005 /pp_hot.c
parenta41aa44d9dc4a3ba586d871754bd11137bdc37a2 (diff)
downloadperl-fbfb1899dd79253696b441cc1c4968a1057c2574.tar.gz
tidy up patten match copying code
(no functional changes). 1. Remove some dead code from pp_split; it's protected by an assert that it could never be called. 2. Simplify the flags settings for the call to CALLREGEXEC() in pp_substcont: on subsequent matches we always set REXEC_NOT_FIRST, which forces the regex engine not to copy anyway, so passing the REXEC_COPY_STR is pointless, as is the conditional code to set it. 3. (whitespace change): split a conditional expression over 2 lines for easier reading.
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pp_hot.c b/pp_hot.c
index 6530ae5b4d..b549d1c856 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -2217,7 +2217,8 @@ PP(pp_subst)
#ifdef PERL_OLD_COPY_ON_WRITE
&& !is_cow
#endif
- && (I32)clen <= RX_MINLENRET(rx) && (once || !(r_flags & REXEC_COPY_STR))
+ && (I32)clen <= RX_MINLENRET(rx)
+ && (once || !(r_flags & REXEC_COPY_STR))
&& !(RX_EXTFLAGS(rx) & RXf_LOOKBEHIND_SEEN)
&& (!doutf8 || SvUTF8(TARG))
&& !(rpm->op_pmflags & PMf_NONDESTRUCT))