diff Objects/stringlib/unicodedefs.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/unicodedefs.h	Tue Oct 11 23:00:31 2011 +0200
+++ b/Objects/stringlib/unicodedefs.h	Tue Oct 11 23:22:22 2011 +0200
@@ -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"