mirror of
https://github.com/python/cpython.git
synced 2025-07-12 13:55:34 +00:00
Backed out changeset b9c9691c72c5
Issue #28858: The change b9c9691c72c5 introduced a regression. It seems like _PyObject_CallArg1() uses more stack memory than PyObject_CallFunctionObjArgs().
This commit is contained in:
parent
c8d03187ff
commit
de4ae3d486
33 changed files with 83 additions and 71 deletions
|
@ -469,7 +469,7 @@ filter_next(filterobject *lz)
|
|||
ok = PyObject_IsTrue(item);
|
||||
} else {
|
||||
PyObject *good;
|
||||
good = _PyObject_CallArg1(lz->func, item);
|
||||
good = PyObject_CallFunctionObjArgs(lz->func, item, NULL);
|
||||
if (good == NULL) {
|
||||
Py_DECREF(item);
|
||||
return NULL;
|
||||
|
@ -1519,7 +1519,7 @@ min_max(PyObject *args, PyObject *kwds, int op)
|
|||
while (( item = PyIter_Next(it) )) {
|
||||
/* get the value from the key function */
|
||||
if (keyfunc != NULL) {
|
||||
val = _PyObject_CallArg1(keyfunc, item);
|
||||
val = PyObject_CallFunctionObjArgs(keyfunc, item, NULL);
|
||||
if (val == NULL)
|
||||
goto Fail_it_item;
|
||||
}
|
||||
|
@ -2044,9 +2044,9 @@ builtin_round(PyObject *self, PyObject *args, PyObject *kwds)
|
|||
}
|
||||
|
||||
if (ndigits == NULL || ndigits == Py_None)
|
||||
result = _PyObject_CallNoArg(round);
|
||||
result = PyObject_CallFunctionObjArgs(round, NULL);
|
||||
else
|
||||
result = _PyObject_CallArg1(round, ndigits);
|
||||
result = PyObject_CallFunctionObjArgs(round, ndigits, NULL);
|
||||
Py_DECREF(round);
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue