mirror of
https://github.com/python/cpython.git
synced 2025-08-31 22:18:28 +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
|
@ -40,11 +40,11 @@ import_all_from(PyThreadState *tstate, PyObject *locals, PyObject *v)
|
|||
int skip_leading_underscores = 0;
|
||||
int pos, err;
|
||||
|
||||
if (_PyObject_LookupAttr(v, &_Py_ID(__all__), &all) < 0) {
|
||||
if (PyObject_GetOptionalAttr(v, &_Py_ID(__all__), &all) < 0) {
|
||||
return -1; /* Unexpected error */
|
||||
}
|
||||
if (all == NULL) {
|
||||
if (_PyObject_LookupAttr(v, &_Py_ID(__dict__), &dict) < 0) {
|
||||
if (PyObject_GetOptionalAttr(v, &_Py_ID(__dict__), &dict) < 0) {
|
||||
return -1;
|
||||
}
|
||||
if (dict == NULL) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue