diff options
author | David Mitchell <davem@iabyn.com> | 2012-09-01 11:23:58 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2012-09-08 15:42:07 +0100 |
commit | fbfb1899dd79253696b441cc1c4968a1057c2574 (patch) | |
tree | 18d46c1a1e09a03ef638b31bff844f3004fca005 /pp_ctl.c | |
parent | a41aa44d9dc4a3ba586d871754bd11137bdc37a2 (diff) | |
download | perl-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_ctl.c')
-rw-r--r-- | pp_ctl.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -216,9 +216,7 @@ PP(pp_substcont) if (CxONCE(cx) || s < orig || !CALLREGEXEC(rx, s, cx->sb_strend, orig, (s == m) + RX_GOFS(rx), cx->sb_targ, NULL, - ((cx->sb_rflags & REXEC_COPY_STR) - ? (REXEC_IGNOREPOS|REXEC_NOT_FIRST) - : (REXEC_COPY_STR|REXEC_IGNOREPOS|REXEC_NOT_FIRST)))) + (REXEC_IGNOREPOS|REXEC_NOT_FIRST))) { SV *targ = cx->sb_targ; |