diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-03-24 19:55:47 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-03-24 19:55:47 (GMT) |
commit | d9d769fcdd573ab12b628798288c02dceba53505 (patch) | |
tree | b61e4767ddb9a89e4402a041f381584662363584 /Objects/stringlib/fastsearch.h | |
parent | f7ef47583e743ebecaae8c93dcb92e7a5792884f (diff) | |
download | cpython-d9d769fcdd573ab12b628798288c02dceba53505.zip cpython-d9d769fcdd573ab12b628798288c02dceba53505.tar.gz cpython-d9d769fcdd573ab12b628798288c02dceba53505.tar.bz2 |
Issue #23573: Increased performance of string search operations (str.find,
str.index, str.count, the in operator, str.split, str.partition) with
arguments of different kinds (UCS1, UCS2, UCS4).
Diffstat (limited to 'Objects/stringlib/fastsearch.h')
-rw-r--r-- | Objects/stringlib/fastsearch.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/stringlib/fastsearch.h b/Objects/stringlib/fastsearch.h index cd7cac4..cda68e7 100644 --- a/Objects/stringlib/fastsearch.h +++ b/Objects/stringlib/fastsearch.h @@ -36,7 +36,7 @@ Py_LOCAL_INLINE(Py_ssize_t) STRINGLIB(fastsearch_memchr_1char)(const STRINGLIB_CHAR* s, Py_ssize_t n, STRINGLIB_CHAR ch, unsigned char needle, - Py_ssize_t maxcount, int mode) + int mode) { if (mode == FAST_SEARCH) { const STRINGLIB_CHAR *ptr = s; @@ -115,7 +115,7 @@ FASTSEARCH(const STRINGLIB_CHAR* s, Py_ssize_t n, if (needle != 0) #endif return STRINGLIB(fastsearch_memchr_1char) - (s, n, p[0], needle, maxcount, mode); + (s, n, p[0], needle, mode); } if (mode == FAST_COUNT) { for (i = 0; i < n; i++) |