diff options
author | David Mitchell <davem@iabyn.com> | 2013-06-22 17:24:13 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2013-07-28 10:33:36 +0100 |
commit | 63b37c5b629988880eac5bf297d5319cbc572436 (patch) | |
tree | 0d693f59c658c9264dad9061b571bdc7e798e5d8 /pp_hot.c | |
parent | 9c2cf4937b5a5b262dede4eb956723ce43137ac7 (diff) | |
download | perl-63b37c5b629988880eac5bf297d5319cbc572436.tar.gz |
pp_match(): don't set REXEC_IGNOREPOS on 1st iter
Currently all core callers of regexec set both the
REXEC_IGNOREPOS and REXEC_NOT_FIRST flags, or neither, depending
on whether this is the first or subsequent iteration of a //g;
*except* for one place in pp_match(), where REXEC_IGNOREPOS is set
on the first iteration for the one specific case of /g with an anchored
\G.
Now AFAICT this makes no difference, because the starting position
as calculated by regexec() still comes to the same value of
(strbeg + pos -gofs), and the same value og ganch calculated.
Also in the commit that added this particular use of the flag to pp_match,
(0ef3e39ecdfec), removing the flag makes no difference to the passing or
not of the new test case.
So I don't understand what its purpose it, and its possibly a mistake.
Removing it now makes the code simpler for further clearup.
Diffstat (limited to 'pp_hot.c')
-rw-r--r-- | pp_hot.c | 1 |
1 files changed, 0 insertions, 1 deletions
@@ -1392,7 +1392,6 @@ PP(pp_match) if (!(RX_EXTFLAGS(rx) & RXf_GPOS_SEEN)) curpos = mg->mg_len; else if (RX_EXTFLAGS(rx) & RXf_ANCH_GPOS) { - r_flags |= REXEC_IGNOREPOS; curpos = mg->mg_len; } else if (!(RX_EXTFLAGS(rx) & RXf_GPOS_FLOAT)) |