mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
gh-106521: Remove _PyObject_LookupAttr() function (GH-106642)
This commit is contained in:
parent
e8ab0096a5
commit
be1b968dc1
45 changed files with 351 additions and 352 deletions
|
@ -208,7 +208,7 @@ BaseException_add_note(PyObject *self, PyObject *note)
|
|||
}
|
||||
|
||||
PyObject *notes;
|
||||
if (_PyObject_LookupAttr(self, &_Py_ID(__notes__), ¬es) < 0) {
|
||||
if (PyObject_GetOptionalAttr(self, &_Py_ID(__notes__), ¬es) < 0) {
|
||||
return NULL;
|
||||
}
|
||||
if (notes == NULL) {
|
||||
|
@ -941,7 +941,7 @@ exceptiongroup_subset(
|
|||
PyException_SetCause(eg, PyException_GetCause(orig));
|
||||
|
||||
PyObject *notes;
|
||||
if (_PyObject_LookupAttr(orig, &_Py_ID(__notes__), ¬es) < 0) {
|
||||
if (PyObject_GetOptionalAttr(orig, &_Py_ID(__notes__), ¬es) < 0) {
|
||||
goto error;
|
||||
}
|
||||
if (notes) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue