mirror of
https://github.com/python/cpython.git
synced 2026-03-26 14:40:57 +00:00
Merged revisions 83833,83838-83839,83859,83878 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r83833 | florent.xicluna | 2010-08-08 18:25:27 +0200 (dim., 08 août 2010) | 2 lines Add test case for the HTTPResponse being an iterable. Follow-up of issue #4608. ........ r83838 | florent.xicluna | 2010-08-08 20:03:44 +0200 (dim., 08 août 2010) | 2 lines Typo. ........ r83839 | florent.xicluna | 2010-08-08 20:06:13 +0200 (dim., 08 août 2010) | 2 lines Issue #7564: Skip test_ioctl if another process is attached to /dev/tty. ........ r83859 | florent.xicluna | 2010-08-09 00:07:16 +0200 (lun., 09 août 2010) | 2 lines Fix #8530: Prevent stringlib fastsearch from reading beyond the front of an array. ........ r83878 | florent.xicluna | 2010-08-09 10:29:08 +0200 (lun., 09 août 2010) | 1 line Merge the 2to3 script from /sandbox/trunk/2to3/2to3, revision 72867 (latest). ........
This commit is contained in:
parent
45c67c3efe
commit
172e15fdd6
5 changed files with 41 additions and 5 deletions
|
|
@ -140,13 +140,13 @@ fastsearch(const STRINGLIB_CHAR* s, Py_ssize_t n,
|
|||
/* got a match! */
|
||||
return i;
|
||||
/* miss: check if previous character is part of pattern */
|
||||
if (!STRINGLIB_BLOOM(mask, s[i-1]))
|
||||
if (i > 0 && !STRINGLIB_BLOOM(mask, s[i-1]))
|
||||
i = i - m;
|
||||
else
|
||||
i = i - skip;
|
||||
} else {
|
||||
/* skip: check if previous character is part of pattern */
|
||||
if (!STRINGLIB_BLOOM(mask, s[i-1]))
|
||||
if (i > 0 && !STRINGLIB_BLOOM(mask, s[i-1]))
|
||||
i = i - m;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue