@@ -332,7 +332,7 @@ get_event_loop(void)
332332 return NULL ;
333333 }
334334
335- loop = _PyObject_CallMethodId (policy , & PyId_get_event_loop , NULL );
335+ loop = _PyObject_CallMethodIdNoArgs (policy , & PyId_get_event_loop );
336336 Py_DECREF (policy );
337337 return loop ;
338338}
@@ -493,7 +493,7 @@ future_init(FutureObj *fut, PyObject *loop)
493493 }
494494 fut -> fut_loop = loop ;
495495
496- res = _PyObject_CallMethodId (fut -> fut_loop , & PyId_get_debug , NULL );
496+ res = _PyObject_CallMethodIdNoArgs (fut -> fut_loop , & PyId_get_debug );
497497 if (res == NULL ) {
498498 return -1 ;
499499 }
@@ -1295,9 +1295,8 @@ FutureObj_repr(FutureObj *fut)
12951295
12961296 ENSURE_FUTURE_ALIVE (fut )
12971297
1298- PyObject * rinfo = _PyObject_CallMethodIdObjArgs ((PyObject * )fut ,
1299- & PyId__repr_info ,
1300- NULL );
1298+ PyObject * rinfo = _PyObject_CallMethodIdNoArgs ((PyObject * )fut ,
1299+ & PyId__repr_info );
13011300 if (rinfo == NULL ) {
13021301 return NULL ;
13031302 }
@@ -2197,8 +2196,7 @@ _asyncio_Task_cancel_impl(TaskObj *self)
21972196 PyObject * res ;
21982197 int is_true ;
21992198
2200- res = _PyObject_CallMethodId (
2201- self -> task_fut_waiter , & PyId_cancel , NULL );
2199+ res = _PyObject_CallMethodIdNoArgs (self -> task_fut_waiter , & PyId_cancel );
22022200 if (res == NULL ) {
22032201 return NULL ;
22042202 }
@@ -2735,7 +2733,7 @@ task_step_impl(TaskObj *task, PyObject *exc)
27352733 if (task -> task_must_cancel ) {
27362734 PyObject * r ;
27372735 int is_true ;
2738- r = _PyObject_CallMethodId (result , & PyId_cancel , NULL );
2736+ r = _PyObject_CallMethodIdNoArgs (result , & PyId_cancel );
27392737 if (r == NULL ) {
27402738 return NULL ;
27412739 }
@@ -2826,7 +2824,7 @@ task_step_impl(TaskObj *task, PyObject *exc)
28262824 if (task -> task_must_cancel ) {
28272825 PyObject * r ;
28282826 int is_true ;
2829- r = _PyObject_CallMethodId (result , & PyId_cancel , NULL );
2827+ r = _PyObject_CallMethodIdNoArgs (result , & PyId_cancel );
28302828 if (r == NULL ) {
28312829 return NULL ;
28322830 }
0 commit comments