summaryrefslogtreecommitdiff
path: root/Modules/_asynciomodule.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-12-04 22:59:09 +0100
committerVictor Stinner <victor.stinner@gmail.com>2016-12-04 22:59:09 +0100
commitde4ae3d4869e88dda8bfbad24880cb398160a7a0 (patch)
treeb8c42842a31f408c9fe09993e19fba49d60b2dcf /Modules/_asynciomodule.c
parentc8d03187ff85326ab8b24af06f8a4e391365f42a (diff)
downloadcpython-git-de4ae3d4869e88dda8bfbad24880cb398160a7a0.tar.gz
Backed out changeset b9c9691c72c5
Issue #28858: The change b9c9691c72c5 introduced a regression. It seems like _PyObject_CallArg1() uses more stack memory than PyObject_CallFunctionObjArgs().
Diffstat (limited to 'Modules/_asynciomodule.c')
-rw-r--r--Modules/_asynciomodule.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/Modules/_asynciomodule.c b/Modules/_asynciomodule.c
index 86f191d8f5..4e8f74a3c9 100644
--- a/Modules/_asynciomodule.c
+++ b/Modules/_asynciomodule.c
@@ -721,7 +721,8 @@ static PyObject *
_asyncio_Future__repr_info_impl(FutureObj *self)
/*[clinic end generated code: output=fa69e901bd176cfb input=f21504d8e2ae1ca2]*/
{
- return _PyObject_CallArg1(asyncio_future_repr_info_func, self);
+ return PyObject_CallFunctionObjArgs(
+ asyncio_future_repr_info_func, self, NULL);
}
/*[clinic input]
@@ -1536,7 +1537,8 @@ static PyObject *
_asyncio_Task__repr_info_impl(TaskObj *self)
/*[clinic end generated code: output=6a490eb66d5ba34b input=3c6d051ed3ddec8b]*/
{
- return _PyObject_CallArg1(asyncio_task_repr_info_func, self);
+ return PyObject_CallFunctionObjArgs(
+ asyncio_task_repr_info_func, self, NULL);
}
/*[clinic input]
@@ -1896,7 +1898,7 @@ task_set_error_soon(TaskObj *task, PyObject *et, const char *format, ...)
return NULL;
}
- PyObject *e = _PyObject_CallArg1(et, msg);
+ PyObject *e = PyObject_CallFunctionObjArgs(et, msg, NULL);
Py_DECREF(msg);
if (e == NULL) {
return NULL;
@@ -1946,7 +1948,7 @@ task_step_impl(TaskObj *task, PyObject *exc)
if (!exc) {
/* exc was not a CancelledError */
- exc = _PyObject_CallNoArg(asyncio_CancelledError);
+ exc = PyObject_CallFunctionObjArgs(asyncio_CancelledError, NULL);
if (!exc) {
goto fail;
}
@@ -2179,7 +2181,7 @@ task_step_impl(TaskObj *task, PyObject *exc)
}
/* Check if `result` is a generator */
- o = _PyObject_CallArg1(inspect_isgenerator, result);
+ o = PyObject_CallFunctionObjArgs(inspect_isgenerator, result, NULL);
if (o == NULL) {
/* An exception in inspect.isgenerator */
goto fail;