From: David Mitchell Date: Fri, 27 Dec 2013 22:12:31 +0000 (+0000) Subject: re_intuit_start(): add comments to a block of code X-Git-Tag: upstream/5.20.0~464^2~60 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a5d12a4bb12ce71ab49cce848dc7c1ea4f3111f6;p=platform%2Fupstream%2Fperl.git re_intuit_start(): add comments to a block of code explain what it does! --- diff --git a/regexec.c b/regexec.c index 9f0e2c6..36b4bed 100644 --- a/regexec.c +++ b/regexec.c @@ -699,6 +699,10 @@ Perl_re_intuit_start(pTHX_ goto fail; } + /* in the presence of an anchor, the anchored (relative to the + * start of the regex) substr must also be anchored relative + * to strpos. So quickly reject if substr isn't found there */ + if (prog->check_offset_min == prog->check_offset_max && !(prog->intflags & PREGf_CANY_SEEN) && ! multiline) /* /m can cause \n's to match that aren't