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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 270 additions and 53 deletions

View file

@ -180,8 +180,8 @@ _PySSLContext_set_keylog_filename(PySSLContext *self, PyObject *arg, void *c) {
return 0;
}
/* _Py_fopen_obj() also checks that arg is of proper type. */
fp = _Py_fopen_obj(arg, "a" PY_STDIOTEXTMODE);
/* Py_fopen() also checks that arg is of proper type. */
fp = Py_fopen(arg, "a" PY_STDIOTEXTMODE);
if (fp == NULL)
return -1;