@@ -1237,8 +1237,7 @@ call_tzname(PyObject *tzinfo, PyObject *tzinfoarg)
12371237 if (tzinfo == Py_None )
12381238 Py_RETURN_NONE ;
12391239
1240- result = _PyObject_CallMethodIdObjArgs (tzinfo , & PyId_tzname ,
1241- tzinfoarg , NULL );
1240+ result = _PyObject_CallMethodIdOneArg (tzinfo , & PyId_tzname , tzinfoarg );
12421241
12431242 if (result == NULL || result == Py_None )
12441243 return result ;
@@ -1693,8 +1692,7 @@ build_struct_time(int y, int m, int d, int hh, int mm, int ss, int dstflag)
16931692 return NULL ;
16941693 }
16951694
1696- result = _PyObject_CallMethodIdObjArgs (time , & PyId_struct_time ,
1697- args , NULL );
1695+ result = _PyObject_CallMethodIdOneArg (time , & PyId_struct_time , args );
16981696 Py_DECREF (time );
16991697 Py_DECREF (args );
17001698 return result ;
@@ -2894,8 +2892,7 @@ date_today(PyObject *cls, PyObject *dummy)
28942892 * time.time() delivers; if someone were gonzo about optimization,
28952893 * date.today() could get away with plain C time().
28962894 */
2897- result = _PyObject_CallMethodIdObjArgs (cls , & PyId_fromtimestamp ,
2898- time , NULL );
2895+ result = _PyObject_CallMethodIdOneArg (cls , & PyId_fromtimestamp , time );
28992896 Py_DECREF (time );
29002897 return result ;
29012898}
@@ -3209,8 +3206,8 @@ date_format(PyDateTime_Date *self, PyObject *args)
32093206 if (PyUnicode_GetLength (format ) == 0 )
32103207 return PyObject_Str ((PyObject * )self );
32113208
3212- return _PyObject_CallMethodIdObjArgs ((PyObject * )self , & PyId_strftime ,
3213- format , NULL );
3209+ return _PyObject_CallMethodIdOneArg ((PyObject * )self , & PyId_strftime ,
3210+ format );
32143211}
32153212
32163213/* ISO methods. */
@@ -5960,7 +5957,7 @@ datetime_astimezone(PyDateTime_DateTime *self, PyObject *args, PyObject *kw)
59605957
59615958 temp = (PyObject * )result ;
59625959 result = (PyDateTime_DateTime * )
5963- _PyObject_CallMethodIdObjArgs (tzinfo , & PyId_fromutc , temp , NULL );
5960+ _PyObject_CallMethodIdOneArg (tzinfo , & PyId_fromutc , temp );
59645961 Py_DECREF (temp );
59655962
59665963 return result ;
0 commit comments