summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
diff options
context:
space:
mode:
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 57e478c..63150a9 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