@@ -141,8 +141,7 @@ _is_coroutine(PyObject *coro)
141141 Do this check after 'future_init()'; in case we need to raise
142142 an error, __del__ needs a properly initialized object.
143143 */
144- PyObject * res = PyObject_CallFunctionObjArgs (
145- asyncio_iscoroutine_func , coro , NULL );
144+ PyObject * res = _PyObject_CallOneArg (asyncio_iscoroutine_func , coro );
146145 if (res == NULL ) {
147146 return -1 ;
148147 }
@@ -1286,8 +1285,7 @@ static PyObject *
12861285_asyncio_Future__repr_info_impl (FutureObj * self )
12871286/*[clinic end generated code: output=fa69e901bd176cfb input=f21504d8e2ae1ca2]*/
12881287{
1289- return PyObject_CallFunctionObjArgs (
1290- asyncio_future_repr_info_func , self , NULL );
1288+ return _PyObject_CallOneArg (asyncio_future_repr_info_func , (PyObject * )self );
12911289}
12921290
12931291static PyObject *
@@ -1364,7 +1362,7 @@ FutureObj_finalize(FutureObj *fut)
13641362
13651363 func = _PyObject_GetAttrId (fut -> fut_loop , & PyId_call_exception_handler );
13661364 if (func != NULL ) {
1367- PyObject * res = PyObject_CallFunctionObjArgs (func , context , NULL );
1365+ PyObject * res = _PyObject_CallOneArg (func , context );
13681366 if (res == NULL ) {
13691367 PyErr_WriteUnraisable (func );
13701368 }
@@ -2104,13 +2102,13 @@ _asyncio_Task_current_task_impl(PyTypeObject *type, PyObject *loop)
21042102 Py_DECREF (current_task_func );
21052103 return NULL ;
21062104 }
2107- ret = PyObject_CallFunctionObjArgs (current_task_func , loop , NULL );
2105+ ret = _PyObject_CallOneArg (current_task_func , loop );
21082106 Py_DECREF (current_task_func );
21092107 Py_DECREF (loop );
21102108 return ret ;
21112109 }
21122110 else {
2113- ret = PyObject_CallFunctionObjArgs (current_task_func , loop , NULL );
2111+ ret = _PyObject_CallOneArg (current_task_func , loop );
21142112 Py_DECREF (current_task_func );
21152113 return ret ;
21162114 }
@@ -2146,7 +2144,7 @@ _asyncio_Task_all_tasks_impl(PyTypeObject *type, PyObject *loop)
21462144 return NULL ;
21472145 }
21482146
2149- res = PyObject_CallFunctionObjArgs (all_tasks_func , loop , NULL );
2147+ res = _PyObject_CallOneArg (all_tasks_func , loop );
21502148 Py_DECREF (all_tasks_func );
21512149 return res ;
21522150}
@@ -2159,8 +2157,7 @@ static PyObject *
21592157_asyncio_Task__repr_info_impl (TaskObj * self )
21602158/*[clinic end generated code: output=6a490eb66d5ba34b input=3c6d051ed3ddec8b]*/
21612159{
2162- return PyObject_CallFunctionObjArgs (
2163- asyncio_task_repr_info_func , self , NULL );
2160+ return _PyObject_CallOneArg (asyncio_task_repr_info_func , (PyObject * )self );
21642161}
21652162
21662163/*[clinic input]
@@ -2411,7 +2408,7 @@ TaskObj_finalize(TaskObj *task)
24112408
24122409 func = _PyObject_GetAttrId (task -> task_loop , & PyId_call_exception_handler );
24132410 if (func != NULL ) {
2414- PyObject * res = PyObject_CallFunctionObjArgs (func , context , NULL );
2411+ PyObject * res = _PyObject_CallOneArg (func , context );
24152412 if (res == NULL ) {
24162413 PyErr_WriteUnraisable (func );
24172414 }
@@ -2543,7 +2540,7 @@ task_set_error_soon(TaskObj *task, PyObject *et, const char *format, ...)
25432540 return NULL ;
25442541 }
25452542
2546- PyObject * e = PyObject_CallFunctionObjArgs (et , msg , NULL );
2543+ PyObject * e = _PyObject_CallOneArg (et , msg );
25472544 Py_DECREF (msg );
25482545 if (e == NULL ) {
25492546 return NULL ;
0 commit comments