Issue #28769: The result of PyUnicode_AsUTF8AndSize() and PyUnicode_AsUTF8()
is now of type "const char *" rather of "char *".
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 5fbe56c..b711f0c 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -3972,7 +3972,7 @@
}
-char*
+const char *
PyUnicode_AsUTF8AndSize(PyObject *unicode, Py_ssize_t *psize)
{
PyObject *bytes;
@@ -4007,7 +4007,7 @@
return PyUnicode_UTF8(unicode);
}
-char*
+const char *
PyUnicode_AsUTF8(PyObject *unicode)
{
return PyUnicode_AsUTF8AndSize(unicode, NULL);