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
This commit is contained in:
Victor Stinner 2011-10-11 23:22:22 +02:00
parent c5af7730e3
commit 8cc70dcf70
8 changed files with 15 additions and 2 deletions

View file

@ -6,6 +6,7 @@
#define FASTSEARCH asciilib_fastsearch
#define STRINGLIB(F) asciilib_##F
#define STRINGLIB_OBJECT PyUnicodeObject
#define STRINGLIB_SIZEOF_CHAR 1
#define STRINGLIB_CHAR Py_UCS1
#define STRINGLIB_TYPE_NAME "unicode"
#define STRINGLIB_PARSE_CODE "U"