mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +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
|
@ -415,7 +415,7 @@ call_show_warning(PyObject *category, PyObject *text, PyObject *message,
|
|||
if (msg == NULL)
|
||||
goto error;
|
||||
|
||||
res = _PyObject_CallArg1(show_fn, msg);
|
||||
res = PyObject_CallFunctionObjArgs(show_fn, msg, NULL);
|
||||
Py_DECREF(show_fn);
|
||||
Py_DECREF(msg);
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -1756,7 +1756,7 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag)
|
|||
Py_DECREF(value);
|
||||
goto error;
|
||||
}
|
||||
res = _PyObject_CallArg1(hook, value);
|
||||
res = PyObject_CallFunctionObjArgs(hook, value, NULL);
|
||||
Py_DECREF(value);
|
||||
if (res == NULL)
|
||||
goto error;
|
||||
|
@ -3062,7 +3062,7 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag)
|
|||
Py_DECREF(mgr);
|
||||
if (enter == NULL)
|
||||
goto error;
|
||||
res = _PyObject_CallNoArg(enter);
|
||||
res = PyObject_CallFunctionObjArgs(enter, NULL);
|
||||
Py_DECREF(enter);
|
||||
if (res == NULL)
|
||||
goto error;
|
||||
|
@ -3096,7 +3096,7 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag)
|
|||
}
|
||||
SET_TOP(exit);
|
||||
Py_DECREF(mgr);
|
||||
res = _PyObject_CallNoArg(enter);
|
||||
res = PyObject_CallFunctionObjArgs(enter, NULL);
|
||||
Py_DECREF(enter);
|
||||
if (res == NULL)
|
||||
goto error;
|
||||
|
|
|
@ -985,7 +985,7 @@ get_path_importer(PyObject *path_importer_cache, PyObject *path_hooks,
|
|||
PyObject *hook = PyList_GetItem(path_hooks, j);
|
||||
if (hook == NULL)
|
||||
return NULL;
|
||||
importer = _PyObject_CallArg1(hook, p);
|
||||
importer = PyObject_CallFunctionObjArgs(hook, p, NULL);
|
||||
if (importer != NULL)
|
||||
break;
|
||||
|
||||
|
|
|
@ -1098,7 +1098,7 @@ _PySys_GetSizeOf(PyObject *o)
|
|||
Py_TYPE(o)->tp_name);
|
||||
}
|
||||
else {
|
||||
res = _PyObject_CallNoArg(method);
|
||||
res = PyObject_CallFunctionObjArgs(method, NULL);
|
||||
Py_DECREF(method);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue