Mercurial > cpython-lru_cache-weakref
diff Objects/stringlib/stringdefs.h @ 72874:bfd3fcfb02f3
Fix fastsearch for UCS2 and UCS4
* If needle is 0, try (p[0] >> 16) & 0xff for UCS4
* Disable fastsearch_memchr_1char() if needle is zero for UCS2 and UCS4
| author | Victor Stinner <victor.stinner@haypocalc.com> |
|---|---|
| date | Tue, 11 Oct 2011 23:22:22 +0200 |
| parents | 8beaa9a37387 |
| children | 6b3e871c003c |
line wrap: on
line diff
--- a/Objects/stringlib/stringdefs.h Tue Oct 11 23:00:31 2011 +0200 +++ b/Objects/stringlib/stringdefs.h Tue Oct 11 23:22:22 2011 +0200 @@ -9,6 +9,7 @@ #define FASTSEARCH fastsearch #define STRINGLIB(F) stringlib_##F #define STRINGLIB_OBJECT PyBytesObject +#define STRINGLIB_SIZEOF_CHAR 1 #define STRINGLIB_CHAR char #define STRINGLIB_TYPE_NAME "string" #define STRINGLIB_PARSE_CODE "S"
