summaryrefslogtreecommitdiffstats
path: root/Modules/main.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2025-01-06 12:43:09 (GMT)
committerGitHub <noreply@github.com>2025-01-06 12:43:09 (GMT)
commitf89e5e20cb8964653ea7d6f53d3e40953b6548ce (patch)
tree743bfa078c6861561f1a1b908fc848b968e89fad /Modules/main.c
parent7e8c571604cd18e65cefd26bfc48082840264549 (diff)
downloadcpython-f89e5e20cb8964653ea7d6f53d3e40953b6548ce.zip
cpython-f89e5e20cb8964653ea7d6f53d3e40953b6548ce.tar.gz
cpython-f89e5e20cb8964653ea7d6f53d3e40953b6548ce.tar.bz2
gh-127350: Add Py_fopen() and Py_fclose() functions (#127821)
Diffstat (limited to 'Modules/main.c')
-rw-r--r--Modules/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/main.c b/Modules/main.c
index 3bf2241..5bb1de2 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -370,7 +370,7 @@ pymain_run_file_obj(PyObject *program_name, PyObject *filename,
return pymain_exit_err_print();
}
- FILE *fp = _Py_fopen_obj(filename, "rb");
+ FILE *fp = Py_fopen(filename, "rb");
if (fp == NULL) {
// Ignore the OSError
PyErr_Clear();
@@ -465,7 +465,7 @@ pymain_run_startup(PyConfig *config, int *exitcode)
goto error;
}
- FILE *fp = _Py_fopen_obj(startup, "r");
+ FILE *fp = Py_fopen(startup, "r");
if (fp == NULL) {
int save_errno = errno;
PyErr_Clear();