summaryrefslogtreecommitdiffstats
path: root/Modules/_io/fileio.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2023-07-12 05:57:10 (GMT)
committerGitHub <noreply@github.com>2023-07-12 05:57:10 (GMT)
commitbe1b968dc1e63c3c68e161ddc5a05eb064833440 (patch)
tree8689ba9f656854b83bf24b82de4fc471437a51ab /Modules/_io/fileio.c
parente8ab0096a583184fe24dfbc39eff70d270c8e6f4 (diff)
downloadcpython-be1b968dc1e63c3c68e161ddc5a05eb064833440.zip
cpython-be1b968dc1e63c3c68e161ddc5a05eb064833440.tar.gz
cpython-be1b968dc1e63c3c68e161ddc5a05eb064833440.tar.bz2
gh-106521: Remove _PyObject_LookupAttr() function (GH-106642)
Diffstat (limited to 'Modules/_io/fileio.c')
-rw-r--r--Modules/_io/fileio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_io/fileio.c b/Modules/_io/fileio.c
index 1a5b613..39709fd 100644
--- a/Modules/_io/fileio.c
+++ b/Modules/_io/fileio.c
@@ -1099,7 +1099,7 @@ fileio_repr(fileio *self)
if (self->fd < 0)
return PyUnicode_FromFormat("<_io.FileIO [closed]>");
- if (_PyObject_LookupAttr((PyObject *) self, &_Py_ID(name), &nameobj) < 0) {
+ if (PyObject_GetOptionalAttr((PyObject *) self, &_Py_ID(name), &nameobj) < 0) {
return NULL;
}
if (nameobj == NULL) {