summaryrefslogtreecommitdiffstats
path: root/Objects/stringlib/ucs2lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/stringlib/ucs2lib.h')
-rw-r--r--Objects/stringlib/ucs2lib.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/Objects/stringlib/ucs2lib.h b/Objects/stringlib/ucs2lib.h
index 75f11bc..4b49bbb 100644
--- a/Objects/stringlib/ucs2lib.h
+++ b/Objects/stringlib/ucs2lib.h
@@ -21,6 +21,10 @@
#define STRINGLIB_CHECK PyUnicode_Check
#define STRINGLIB_CHECK_EXACT PyUnicode_CheckExact
#define STRINGLIB_MUTABLE 0
+#if SIZEOF_WCHAR_T == 2
+#define STRINGLIB_FAST_MEMCHR(s, c, n) \
+ (Py_UCS2 *)wmemchr((const wchar_t *)(s), c, n)
+#endif
#define STRINGLIB_TOSTR PyObject_Str
#define STRINGLIB_TOASCII PyObject_ASCII