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 /Python | |
| 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 'Python')
| -rw-r--r-- | Python/context.c | 2 | ||||
| -rw-r--r-- | Python/fileutils.c | 8 |
2 files changed, 1 insertions, 9 deletions
diff --git a/Python/context.c b/Python/context.c index f30b59b..bb1aa42 100644 --- a/Python/context.c +++ b/Python/context.c @@ -860,7 +860,7 @@ contextvar_generate_hash(void *addr, PyObject *name) return -1; } - Py_hash_t res = _Py_HashPointer(addr) ^ name_hash; + Py_hash_t res = Py_HashPointer(addr) ^ name_hash; return res == -1 ? -2 : res; } diff --git a/Python/fileutils.c b/Python/fileutils.c index 72804c3..68d24bc 100644 --- a/Python/fileutils.c +++ b/Python/fileutils.c @@ -1842,14 +1842,6 @@ Py_fopen(PyObject *path, const char *mode) } -// Deprecated alias to Py_fopen() kept for backward compatibility -FILE* -_Py_fopen_obj(PyObject *path, const char *mode) -{ - return Py_fopen(path, mode); -} - - // Call fclose(). // // On Windows, files opened by Py_fopen() in the Python DLL must be closed by |
