summaryrefslogtreecommitdiff
path: root/Objects/stringlib/unicodedefs.h
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/stringlib/unicodedefs.h')
-rw-r--r--Objects/stringlib/unicodedefs.h22
1 files changed, 3 insertions, 19 deletions
diff --git a/Objects/stringlib/unicodedefs.h b/Objects/stringlib/unicodedefs.h
index 366acfe001..09dae6dc9e 100644
--- a/Objects/stringlib/unicodedefs.h
+++ b/Objects/stringlib/unicodedefs.h
@@ -11,6 +11,8 @@
#define STRINGLIB_TYPE_NAME "unicode"
#define STRINGLIB_PARSE_CODE "U"
#define STRINGLIB_EMPTY unicode_empty
+#define STRINGLIB_ISSPACE Py_UNICODE_ISSPACE
+#define STRINGLIB_ISLINEBREAK BLOOM_LINEBREAK
#define STRINGLIB_ISDECIMAL Py_UNICODE_ISDECIMAL
#define STRINGLIB_TODECIMAL Py_UNICODE_TODECIMAL
#define STRINGLIB_TOUPPER Py_UNICODE_TOUPPER
@@ -21,6 +23,7 @@
#define STRINGLIB_NEW PyUnicode_FromUnicode
#define STRINGLIB_RESIZE PyUnicode_Resize
#define STRINGLIB_CHECK PyUnicode_Check
+#define STRINGLIB_CHECK_EXACT PyUnicode_CheckExact
#define STRINGLIB_GROUPING _PyUnicode_InsertThousandsGrouping
#define STRINGLIB_GROUPING_LOCALE _PyUnicode_InsertThousandsGroupingLocale
@@ -34,23 +37,4 @@
#define STRINGLIB_WANT_CONTAINS_OBJ 1
-/* STRINGLIB_CMP was defined as:
-
-Py_LOCAL_INLINE(int)
-STRINGLIB_CMP(const Py_UNICODE* str, const Py_UNICODE* other, Py_ssize_t len)
-{
- if (str[0] != other[0])
- return 1;
- return memcmp((void*) str, (void*) other, len * sizeof(Py_UNICODE));
-}
-
-but unfortunately that gives a error if the function isn't used in a file that
-includes this file. So, reluctantly convert it to a macro instead. */
-
-#define STRINGLIB_CMP(str, other, len) \
- (((str)[0] != (other)[0]) ? \
- 1 : \
- memcmp((void*) (str), (void*) (other), (len) * sizeof(Py_UNICODE)))
-
-
#endif /* !STRINGLIB_UNICODEDEFS_H */