diff options
author | Ilya Zakharevich <ilya@math.berkeley.edu> | 1999-09-29 14:29:52 -0400 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 1999-09-30 08:13:40 +0000 |
commit | 28d0b3365dc4f42e40834c1cabc35cf3b9e81d25 (patch) | |
tree | 649aa67081a6e85ed8246c8fd19b8f9d13f1c580 /regexec.c | |
parent | a637e931ce88a2dedcb08a48064d432216fbee41 (diff) | |
download | perl-28d0b3365dc4f42e40834c1cabc35cf3b9e81d25.tar.gz |
(Removed by #4262.)
To: desar@club-internet.fr (François Désarménien)
Cc: perl5-porters@perl.org (perl5-porters@perl.org)
Subject: Re: Strange RE engine breakage in 5_61
Message-Id: <199909292229.SAA18917@monk.mps.ohio-state.edu>
p4raw-id: //depot/cfgperl@4252
Diffstat (limited to 'regexec.c')
-rw-r--r-- | regexec.c | 22 |
1 files changed, 13 insertions, 9 deletions
@@ -739,19 +739,23 @@ Perl_regexec_flags(pTHX_ register regexp *prog, char *stringarg, register char * /* If there is a "must appear" string, look for it. */ s = startpos; - if (prog->reganch & ROPT_GPOS_SEEN) { + if (prog->reganch & ROPT_GPOS_SEEN) { /* Need to have PL_reg_ganch */ MAGIC *mg; - if (!(flags & REXEC_IGNOREPOS) && sv && SvTYPE(sv) >= SVt_PVMG - && SvMAGIC(sv) && (mg = mg_find(sv, 'g')) && mg->mg_len >= 0) - PL_reg_ganch = strbeg + mg->mg_len; - else + if (flags & REXEC_IGNOREPOS) PL_reg_ganch = startpos; - if (prog->reganch & ROPT_ANCH_GPOS) { - if (s > PL_reg_ganch) - goto phooey; - s = PL_reg_ganch; + else if (sv && SvTYPE(sv) >= SVt_PVMG + && SvMAGIC(sv) + && (mg = mg_find(sv, 'g')) && mg->mg_len >= 0) { + PL_reg_ganch = strbeg + mg->mg_len; /* Defined pos() */ + if (prog->reganch & ROPT_ANCH_GPOS) { + if (s > PL_reg_ganch) + goto phooey; + s = PL_reg_ganch; + } } + else + PL_reg_ganch = strbeg; } if (!(flags & REXEC_CHECKED) && prog->check_substr != Nullsv) { |