mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +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
|
@ -2258,8 +2258,7 @@ list_sort_impl(PyListObject *self, PyObject *keyfunc, int reverse)
|
|||
}
|
||||
|
||||
for (i = 0; i < saved_ob_size ; i++) {
|
||||
keys[i] = PyObject_CallFunctionObjArgs(keyfunc, saved_ob_item[i],
|
||||
NULL);
|
||||
keys[i] = _PyObject_CallOneArg(keyfunc, saved_ob_item[i]);
|
||||
if (keys[i] == NULL) {
|
||||
for (i=i-1 ; i>=0 ; i--)
|
||||
Py_DECREF(keys[i]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue