gh-127350: Add Py_fopen() and Py_fclose() functions (#127821)

This commit is contained in:
Victor Stinner
2025-01-06 13:43:09 +01:00
committed by GitHub
parent 7e8c571604
commit f89e5e20cb
18 changed files with 270 additions and 53 deletions

View File

@@ -467,7 +467,7 @@ _PyRun_SimpleFileObject(FILE *fp, PyObject *filename, int closeit,
fclose(fp);
}
pyc_fp = _Py_fopen_obj(filename, "rb");
pyc_fp = Py_fopen(filename, "rb");
if (pyc_fp == NULL) {
fprintf(stderr, "python: Can't reopen .pyc file\n");
goto done;