diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-10-13 16:07:37 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-10-13 16:07:37 (GMT) |
commit | c198d0599b7be72a1b88c7573897d7535cd89678 (patch) | |
tree | 8019bb4359bce0b4861dacc387df9e371bfd1ab1 /Objects/stringlib | |
parent | dda339e6d22778f5c4bdeb6f588d341ce131acbb (diff) | |
download | cpython-c198d0599b7be72a1b88c7573897d7535cd89678.zip cpython-c198d0599b7be72a1b88c7573897d7535cd89678.tar.gz cpython-c198d0599b7be72a1b88c7573897d7535cd89678.tar.bz2 |
Add a comment explaining this heuristic.
Diffstat (limited to 'Objects/stringlib')
-rw-r--r-- | Objects/stringlib/fastsearch.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Objects/stringlib/fastsearch.h b/Objects/stringlib/fastsearch.h index 0f7aea7..eb3d694 100644 --- a/Objects/stringlib/fastsearch.h +++ b/Objects/stringlib/fastsearch.h @@ -115,6 +115,9 @@ FASTSEARCH(const STRINGLIB_CHAR* s, Py_ssize_t n, unsigned char needle; needle = p[0] & 0xff; #if STRINGLIB_SIZEOF_CHAR > 1 + /* If looking for a multiple of 256, we'd have two + many false positives looking for the '\0' byte in UCS2 + and UCS4 representations. */ if (needle != 0) #endif return STRINGLIB(fastsearch_memchr_1char) |