summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
Diffstat (limited to 'Include')
-rw-r--r--Include/unicodeobject.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/Include/unicodeobject.h b/Include/unicodeobject.h
index 74cb033..b9840dd 100644
--- a/Include/unicodeobject.h
+++ b/Include/unicodeobject.h
@@ -107,6 +107,17 @@ typedef unsigned short Py_UNICODE;
#endif
+/*
+ * Use this typedef when you need to represent a UTF-16 surrogate pair
+ * as single unsigned integer.
+ */
+#if SIZEOF_INT >= 4
+typedef unsigned int Py_UCS4;
+#elif SIZEOF_LONG >= 4
+typedef unsigned long Py_UCS4;
+#endif
+
+
/* --- Internal Unicode Operations ---------------------------------------- */
/* If you want Python to use the compiler's wctype.h functions instead