aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Objects/fileobject.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2023-07-12 08:57:10 +0300
committerGitHub <noreply@github.com>2023-07-12 08:57:10 +0300
commitbe1b968dc1e63c3c68e161ddc5a05eb064833440 (patch)
tree8689ba9f656854b83bf24b82de4fc471437a51ab /Objects/fileobject.c
parente8ab0096a583184fe24dfbc39eff70d270c8e6f4 (diff)
downloadcpython-be1b968dc1e63c3c68e161ddc5a05eb064833440.tar.gz
cpython-be1b968dc1e63c3c68e161ddc5a05eb064833440.zip
gh-106521: Remove _PyObject_LookupAttr() function (GH-106642)
Diffstat (limited to 'Objects/fileobject.c')
-rw-r--r--Objects/fileobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/fileobject.c b/Objects/fileobject.c
index 6d980a1b379..751fb69d089 100644
--- a/Objects/fileobject.c
+++ b/Objects/fileobject.c
@@ -176,7 +176,7 @@ PyObject_AsFileDescriptor(PyObject *o)
if (PyLong_Check(o)) {
fd = _PyLong_AsInt(o);
}
- else if (_PyObject_LookupAttr(o, &_Py_ID(fileno), &meth) < 0) {
+ else if (PyObject_GetOptionalAttr(o, &_Py_ID(fileno), &meth) < 0) {
return -1;
}
else if (meth != NULL) {