summaryrefslogtreecommitdiffstats
path: root/Objects/stringlib/ucs1lib.h
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-10-11 21:22:22 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-10-11 21:22:22 (GMT)
commit8cc70dcf7020f1e5c286fed5b2a1034f5ba36afe (patch)
treedb00355ce68c1bfaab38405c9400c22f31b6c7db /Objects/stringlib/ucs1lib.h
parentc5af7730e34f15d917730c66076125d4e545f11a (diff)
downloadcpython-8cc70dcf7020f1e5c286fed5b2a1034f5ba36afe.zip
cpython-8cc70dcf7020f1e5c286fed5b2a1034f5ba36afe.tar.gz
cpython-8cc70dcf7020f1e5c286fed5b2a1034f5ba36afe.tar.bz2
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/ucs1lib.h')
-rw-r--r--Objects/stringlib/ucs1lib.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Objects/stringlib/ucs1lib.h b/Objects/stringlib/ucs1lib.h
index c0f7adf..0b82a84 100644
--- a/Objects/stringlib/ucs1lib.h
+++ b/Objects/stringlib/ucs1lib.h
@@ -6,6 +6,7 @@
#define FASTSEARCH ucs1lib_fastsearch
#define STRINGLIB(F) ucs1lib_##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"