mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
gh-106320: Remove private _PyUnicode_AsString() alias (#107021)
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.
This commit is contained in:
parent
76e20c361c
commit
463b56da12
2 changed files with 5 additions and 5 deletions
|
|
@ -446,17 +446,12 @@ PyAPI_FUNC(PyObject*) PyUnicode_FromKindAndData(
|
|||
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
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
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.
|
||||
Loading…
Add table
Add a link
Reference in a new issue