summaryrefslogtreecommitdiff
path: root/Objects/stringlib/unicodedefs.h
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-10-11 23:22:22 +0200
committerVictor Stinner <victor.stinner@haypocalc.com>2011-10-11 23:22:22 +0200
commit6b562366239b4bbab19d40b30fe5e22fe51adb95 (patch)
tree0d3f667948be5bcb497a7a4660798c2e412ec682 /Objects/stringlib/unicodedefs.h
parent67fae65932f90701bd15cbb29943a84d1f8f5f94 (diff)
downloadcpython-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.h1
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"