summaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/Include/unicodeobject.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/tools/python3/Include/unicodeobject.h')
-rw-r--r--contrib/tools/python3/Include/unicodeobject.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/contrib/tools/python3/Include/unicodeobject.h b/contrib/tools/python3/Include/unicodeobject.h
index 5839c747a29..dee00715b3c 100644
--- a/contrib/tools/python3/Include/unicodeobject.h
+++ b/contrib/tools/python3/Include/unicodeobject.h
@@ -1,8 +1,6 @@
#ifndef Py_UNICODEOBJECT_H
#define Py_UNICODEOBJECT_H
-#include <stdarg.h> // va_list
-
/*
Unicode implementation based on original code by Fredrik Lundh,
@@ -55,8 +53,6 @@ Copyright (c) Corporation for National Research Initiatives.
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
* -------------------------------------------------------------------- */
-#include <ctype.h>
-
/* === Internal API ======================================================= */
/* --- Internal Unicode Format -------------------------------------------- */
@@ -93,10 +89,6 @@ Copyright (c) Corporation for National Research Initiatives.
# endif
#endif
-#ifdef HAVE_WCHAR_H
-# include <wchar.h>
-#endif
-
/* Py_UCS4 and Py_UCS2 are typedefs for the respective
unicode representations. */
typedef uint32_t Py_UCS4;
@@ -965,6 +957,15 @@ PyAPI_FUNC(int) PyUnicode_CompareWithASCIIString(
const char *right /* ASCII-encoded string */
);
+#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030D0000
+/* Compare a Unicode object with UTF-8 encoded C string.
+ Return 1 if they are equal, or 0 otherwise.
+ This function does not raise exceptions. */
+
+PyAPI_FUNC(int) PyUnicode_EqualToUTF8(PyObject *, const char *);
+PyAPI_FUNC(int) PyUnicode_EqualToUTF8AndSize(PyObject *, const char *, Py_ssize_t);
+#endif
+
/* Rich compare two strings and return one of the following:
- NULL in case an exception was raised