aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/ceval.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 /Python/ceval.c
parente8ab0096a583184fe24dfbc39eff70d270c8e6f4 (diff)
downloadcpython-be1b968dc1e63c3c68e161ddc5a05eb064833440.tar.gz
cpython-be1b968dc1e63c3c68e161ddc5a05eb064833440.zip
gh-106521: Remove _PyObject_LookupAttr() function (GH-106642)
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 57e478c1313..63150a9456b 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -419,7 +419,7 @@ match_class_attr(PyThreadState *tstate, PyObject *subject, PyObject *type,
return NULL;
}
PyObject *attr;
- (void)_PyObject_LookupAttr(subject, name, &attr);
+ (void)PyObject_GetOptionalAttr(subject, name, &attr);
return attr;
}
@@ -454,7 +454,7 @@ match_class(PyThreadState *tstate, PyObject *subject, PyObject *type,
// First, the positional subpatterns:
if (nargs) {
int match_self = 0;
- if (_PyObject_LookupAttr(type, &_Py_ID(__match_args__), &match_args) < 0) {
+ if (PyObject_GetOptionalAttr(type, &_Py_ID(__match_args__), &match_args) < 0) {
goto fail;
}
if (match_args) {
@@ -2414,7 +2414,7 @@ import_from(PyThreadState *tstate, PyObject *v, PyObject *name)
PyObject *x;
PyObject *fullmodname, *pkgname, *pkgpath, *pkgname_or_unknown, *errmsg;
- if (_PyObject_LookupAttr(v, name, &x) != 0) {
+ if (PyObject_GetOptionalAttr(v, name, &x) != 0) {
return x;
}
/* Issue #17636: in case this failed because of a circular relative