mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
bpo-37337: Add _PyObject_CallMethodNoArgs() (GH-14267)
This commit is contained in:
parent
38f44b4a4a
commit
762f93ff2e
37 changed files with 154 additions and 132 deletions
|
|
@ -920,7 +920,7 @@ odict_reduce(register PyODictObject *od, PyObject *Py_UNUSED(ignored))
|
|||
if (args == NULL)
|
||||
goto Done;
|
||||
|
||||
items = _PyObject_CallMethodIdObjArgs((PyObject *)od, &PyId_items, NULL);
|
||||
items = _PyObject_CallMethodIdNoArgs((PyObject *)od, &PyId_items);
|
||||
if (items == NULL)
|
||||
goto Done;
|
||||
|
||||
|
|
@ -1421,8 +1421,8 @@ odict_repr(PyODictObject *self)
|
|||
Py_SIZE(pieces) = count;
|
||||
}
|
||||
else {
|
||||
PyObject *items = _PyObject_CallMethodIdObjArgs((PyObject *)self,
|
||||
&PyId_items, NULL);
|
||||
PyObject *items = _PyObject_CallMethodIdNoArgs((PyObject *)self,
|
||||
&PyId_items);
|
||||
if (items == NULL)
|
||||
goto Done;
|
||||
pieces = PySequence_List(items);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue