cpython/Include/cpython/fileutils.h
Victor Stinner 9012fa741d
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.
2025-01-22 11:04:19 +00:00

16 lines
386 B
C

#ifndef Py_CPYTHON_FILEUTILS_H
# error "this header file must not be included directly"
#endif
PyAPI_FUNC(FILE*) Py_fopen(
PyObject *path,
const char *mode);
// Deprecated alias kept for backward compatibility
Py_DEPRECATED(3.14) static inline FILE*
_Py_fopen_obj(PyObject *path, const char *mode)
{
return Py_fopen(path, mode);
}
PyAPI_FUNC(int) Py_fclose(FILE *file);