summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
Diffstat (limited to 'Include')
-rw-r--r--Include/cpython/fileutils.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/Include/cpython/fileutils.h b/Include/cpython/fileutils.h
index b386ad1..702f89a 100644
--- a/Include/cpython/fileutils.h
+++ b/Include/cpython/fileutils.h
@@ -2,7 +2,13 @@
# error "this header file must not be included directly"
#endif
-// Used by _testcapi which must not use the internal C API
-PyAPI_FUNC(FILE*) _Py_fopen_obj(
+PyAPI_FUNC(FILE*) Py_fopen(
PyObject *path,
const char *mode);
+
+// Deprecated alias to Py_fopen() kept for backward compatibility
+Py_DEPRECATED(3.14) PyAPI_FUNC(FILE*) _Py_fopen_obj(
+ PyObject *path,
+ const char *mode);
+
+PyAPI_FUNC(int) Py_fclose(FILE *file);