summaryrefslogtreecommitdiff
path: root/Modules/_asynciomodule.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-12-05 17:04:32 +0100
committerVictor Stinner <victor.stinner@gmail.com>2016-12-05 17:04:32 +0100
commit40273ec4f37c65c13a09d0ac23b08c99ebe2f1a3 (patch)
treee843389bf11bcc519d75967e52d9a4ddc04f0b1e /Modules/_asynciomodule.c
parent0a0cf9e33e1c7355efbbb00702d59f66f1a02df6 (diff)
downloadcpython-40273ec4f37c65c13a09d0ac23b08c99ebe2f1a3.tar.gz
Issue #28858: Remove _PyObject_CallArg1() macro
Replace _PyObject_CallArg1(func, arg) with PyObject_CallFunctionObjArgs(func, arg, NULL) Using the _PyObject_CallArg1() macro increases the usage of the C stack, which was unexpected and unwanted. PyObject_CallFunctionObjArgs() doesn't have this issue.
Diffstat (limited to 'Modules/_asynciomodule.c')
-rw-r--r--Modules/_asynciomodule.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_asynciomodule.c b/Modules/_asynciomodule.c
index 4e8f74a3c9..ea02a5e9c0 100644
--- a/Modules/_asynciomodule.c
+++ b/Modules/_asynciomodule.c
@@ -257,7 +257,7 @@ future_get_result(FutureObj *fut, PyObject **result)
return -1;
}
- exc = _PyObject_CallArg1(asyncio_InvalidStateError, msg);
+ exc = PyObject_CallFunctionObjArgs(asyncio_InvalidStateError, msg, NULL);
Py_DECREF(msg);
if (exc == NULL) {
return -1;
@@ -835,7 +835,7 @@ FutureObj_finalize(FutureObj *fut)
func = _PyObject_GetAttrId(fut->fut_loop, &PyId_call_exception_handler);
if (func != NULL) {
- res = _PyObject_CallArg1(func, context);
+ res = PyObject_CallFunctionObjArgs(func, context, NULL);
if (res == NULL) {
PyErr_WriteUnraisable(func);
}
@@ -1731,7 +1731,7 @@ TaskObj_finalize(TaskObj *task)
func = _PyObject_GetAttrId(task->task_loop, &PyId_call_exception_handler);
if (func != NULL) {
- res = _PyObject_CallArg1(func, context);
+ res = PyObject_CallFunctionObjArgs(func, context, NULL);
if (res == NULL) {
PyErr_WriteUnraisable(func);
}