Remove private _PyUnicode_AsString() alias to PyUnicode_AsUTF8(). It
was kept for backward compatibility with Python 3.0 - 3.2.
The PyUnicode_AsUTF8() is available since Python
3.3. The PyUnicode_AsUTF8String() function can be used to keep
compatibility with Python 3.2 and older.
Like PyUnicode_AsUTF8AndSize(), this also caches the UTF-8 representation
in the unicodeobject.
- _PyUnicode_AsString is a #define for PyUnicode_AsUTF8 to
- support the previous internal function with the same behaviour.
-
Use of this API is DEPRECATED since no size information can be
extracted from the returned data.
*/
PyAPI_FUNC(const char *) PyUnicode_AsUTF8(PyObject *unicode);
-#define _PyUnicode_AsString PyUnicode_AsUTF8
-
/* === Characters Type APIs =============================================== */
/* These should not be used directly. Use the Py_UNICODE_IS* and
--- /dev/null
+Remove private ``_PyUnicode_AsString()`` alias to
+:c:func:`PyUnicode_AsUTF8`. It was kept for backward compatibility with
+Python 3.0 - 3.2. The :c:func:`PyUnicode_AsUTF8` is available since Python
+3.3. The :c:func:`PyUnicode_AsUTF8String` function can be used to keep
+compatibility with Python 3.2 and older. Patch by Victor Stinner.