diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-10-11 23:22:22 +0200 |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-10-11 23:22:22 +0200 |
commit | 6b562366239b4bbab19d40b30fe5e22fe51adb95 (patch) | |
tree | 0d3f667948be5bcb497a7a4660798c2e412ec682 /Objects/stringlib/unicodedefs.h | |
parent | 67fae65932f90701bd15cbb29943a84d1f8f5f94 (diff) | |
download | cpython-6b562366239b4bbab19d40b30fe5e22fe51adb95.tar.gz |
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
Diffstat (limited to 'Objects/stringlib/unicodedefs.h')
-rw-r--r-- | Objects/stringlib/unicodedefs.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Objects/stringlib/unicodedefs.h b/Objects/stringlib/unicodedefs.h index 0c40b801e3..5c0761a74c 100644 --- a/Objects/stringlib/unicodedefs.h +++ b/Objects/stringlib/unicodedefs.h @@ -9,6 +9,7 @@ #define FASTSEARCH fastsearch #define STRINGLIB(F) stringlib_##F #define STRINGLIB_OBJECT PyUnicodeObject +#define STRINGLIB_SIZEOF_CHAR Py_UNICODE_SIZE #define STRINGLIB_CHAR Py_UNICODE #define STRINGLIB_TYPE_NAME "unicode" #define STRINGLIB_PARSE_CODE "U" |