diff options
| author | Victor Stinner <vstinner@python.org> | 2025-01-22 11:04:19 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-22 11:04:19 (GMT) |
| commit | 9012fa741d55419dc77c5c191794eb93e71ae9a4 (patch) | |
| tree | d8b2560baa9ab8b9ac3719afbeae87076a7cdbc7 /Include/cpython/unicodeobject.h | |
| parent | 470a0a68ebbbb4254f1a3e8e22cce0c3a0827055 (diff) | |
| download | cpython-9012fa741d55419dc77c5c191794eb93e71ae9a4.zip cpython-9012fa741d55419dc77c5c191794eb93e71ae9a4.tar.gz cpython-9012fa741d55419dc77c5c191794eb93e71ae9a4.tar.bz2 | |
gh-128863: Deprecate private C API functions (#128864)
Deprecate private C API functions:
* _PyBytes_Join()
* _PyDict_GetItemStringWithError()
* _PyDict_Pop()
* _PyThreadState_UncheckedGet()
* _PyUnicode_AsString()
* _Py_HashPointer()
* _Py_fopen_obj()
Replace _Py_HashPointer() with Py_HashPointer().
Remove references to deprecated functions.
Diffstat (limited to 'Include/cpython/unicodeobject.h')
| -rw-r--r-- | Include/cpython/unicodeobject.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Include/cpython/unicodeobject.h b/Include/cpython/unicodeobject.h index 46a01c8..287de52b 100644 --- a/Include/cpython/unicodeobject.h +++ b/Include/cpython/unicodeobject.h @@ -630,8 +630,12 @@ _PyUnicodeWriter_Dealloc(_PyUnicodeWriter *writer); PyAPI_FUNC(const char *) PyUnicode_AsUTF8(PyObject *unicode); -// Alias kept for backward compatibility -#define _PyUnicode_AsString PyUnicode_AsUTF8 +// Deprecated alias kept for backward compatibility +Py_DEPRECATED(3.14) static inline const char* +_PyUnicode_AsString(PyObject *unicode) +{ + return PyUnicode_AsUTF8(unicode); +} /* === Characters Type APIs =============================================== */ |
