mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-37483: add _PyObject_CallOneArg() function (#14558)
This commit is contained in:
parent
9d40554e0d
commit
196a530e00
44 changed files with 128 additions and 146 deletions
|
@ -736,8 +736,7 @@ module_getattro(PyModuleObject *m, PyObject *name)
|
|||
_Py_IDENTIFIER(__getattr__);
|
||||
getattr = _PyDict_GetItemId(m->md_dict, &PyId___getattr__);
|
||||
if (getattr) {
|
||||
PyObject* stack[1] = {name};
|
||||
return _PyObject_FastCall(getattr, stack, 1);
|
||||
return _PyObject_CallOneArg(getattr, name);
|
||||
}
|
||||
_Py_IDENTIFIER(__name__);
|
||||
mod_name = _PyDict_GetItemId(m->md_dict, &PyId___name__);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue