@@ -2590,7 +2590,7 @@ delta_getstate(PyDateTime_Delta *self)
25902590}
25912591
25922592static PyObject *
2593- delta_total_seconds (PyObject * self )
2593+ delta_total_seconds (PyObject * self , PyObject * Py_UNUSED ( ignored ) )
25942594{
25952595 PyObject * total_seconds ;
25962596 PyObject * total_microseconds ;
@@ -2606,7 +2606,7 @@ delta_total_seconds(PyObject *self)
26062606}
26072607
26082608static PyObject *
2609- delta_reduce (PyDateTime_Delta * self )
2609+ delta_reduce (PyDateTime_Delta * self , PyObject * Py_UNUSED ( ignored ) )
26102610{
26112611 return Py_BuildValue ("ON" , Py_TYPE (self ), delta_getstate (self ));
26122612}
@@ -2627,7 +2627,7 @@ static PyMemberDef delta_members[] = {
26272627};
26282628
26292629static PyMethodDef delta_methods [] = {
2630- {"total_seconds" , ( PyCFunction ) delta_total_seconds , METH_NOARGS ,
2630+ {"total_seconds" , delta_total_seconds , METH_NOARGS ,
26312631 PyDoc_STR ("Total seconds in the duration." )},
26322632
26332633 {"__reduce__" , (PyCFunction )delta_reduce , METH_NOARGS ,
@@ -2991,7 +2991,7 @@ date_repr(PyDateTime_Date *self)
29912991}
29922992
29932993static PyObject *
2994- date_isoformat (PyDateTime_Date * self )
2994+ date_isoformat (PyDateTime_Date * self , PyObject * Py_UNUSED ( ignored ) )
29952995{
29962996 return PyUnicode_FromFormat ("%04d-%02d-%02d" ,
29972997 GET_YEAR (self ), GET_MONTH (self ), GET_DAY (self ));
@@ -3006,7 +3006,7 @@ date_str(PyDateTime_Date *self)
30063006
30073007
30083008static PyObject *
3009- date_ctime (PyDateTime_Date * self )
3009+ date_ctime (PyDateTime_Date * self , PyObject * Py_UNUSED ( ignored ) )
30103010{
30113011 return format_ctime (self , 0 , 0 , 0 );
30123012}
@@ -3055,15 +3055,15 @@ date_format(PyDateTime_Date *self, PyObject *args)
30553055/* ISO methods. */
30563056
30573057static PyObject *
3058- date_isoweekday (PyDateTime_Date * self )
3058+ date_isoweekday (PyDateTime_Date * self , PyObject * Py_UNUSED ( ignored ) )
30593059{
30603060 int dow = weekday (GET_YEAR (self ), GET_MONTH (self ), GET_DAY (self ));
30613061
30623062 return PyLong_FromLong (dow + 1 );
30633063}
30643064
30653065static PyObject *
3066- date_isocalendar (PyDateTime_Date * self )
3066+ date_isocalendar (PyDateTime_Date * self , PyObject * Py_UNUSED ( ignored ) )
30673067{
30683068 int year = GET_YEAR (self );
30693069 int week1_monday = iso_week1_monday (year );
@@ -3100,7 +3100,7 @@ date_richcompare(PyObject *self, PyObject *other, int op)
31003100}
31013101
31023102static PyObject *
3103- date_timetuple (PyDateTime_Date * self )
3103+ date_timetuple (PyDateTime_Date * self , PyObject * Py_UNUSED ( ignored ) )
31043104{
31053105 return build_struct_time (GET_YEAR (self ),
31063106 GET_MONTH (self ),
@@ -3149,14 +3149,14 @@ date_hash(PyDateTime_Date *self)
31493149}
31503150
31513151static PyObject *
3152- date_toordinal (PyDateTime_Date * self )
3152+ date_toordinal (PyDateTime_Date * self , PyObject * Py_UNUSED ( ignored ) )
31533153{
31543154 return PyLong_FromLong (ymd_to_ord (GET_YEAR (self ), GET_MONTH (self ),
31553155 GET_DAY (self )));
31563156}
31573157
31583158static PyObject *
3159- date_weekday (PyDateTime_Date * self )
3159+ date_weekday (PyDateTime_Date * self , PyObject * Py_UNUSED ( ignored ) )
31603160{
31613161 int dow = weekday (GET_YEAR (self ), GET_MONTH (self ), GET_DAY (self ));
31623162
@@ -3435,7 +3435,7 @@ tzinfo_fromutc(PyDateTime_TZInfo *self, PyObject *dt)
34353435 */
34363436
34373437static PyObject *
3438- tzinfo_reduce (PyObject * self )
3438+ tzinfo_reduce (PyObject * self , PyObject * Py_UNUSED ( ignored ) )
34393439{
34403440 PyObject * args , * state ;
34413441 PyObject * getinitargs , * getstate ;
@@ -3502,7 +3502,7 @@ static PyMethodDef tzinfo_methods[] = {
35023502 {"fromutc" , (PyCFunction )tzinfo_fromutc , METH_O ,
35033503 PyDoc_STR ("datetime in UTC -> datetime in local time." )},
35043504
3505- {"__reduce__" , ( PyCFunction ) tzinfo_reduce , METH_NOARGS ,
3505+ {"__reduce__" , tzinfo_reduce , METH_NOARGS ,
35063506 PyDoc_STR ("-> (cls, state)" )},
35073507
35083508 {NULL , NULL }
@@ -3720,7 +3720,7 @@ timezone_fromutc(PyDateTime_TimeZone *self, PyDateTime_DateTime *dt)
37203720}
37213721
37223722static PyObject *
3723- timezone_getinitargs (PyDateTime_TimeZone * self )
3723+ timezone_getinitargs (PyDateTime_TimeZone * self , PyObject * Py_UNUSED ( ignored ) )
37243724{
37253725 if (self -> name == NULL )
37263726 return Py_BuildValue ("(O)" , self -> offset );
@@ -5173,7 +5173,7 @@ datetime_isoformat(PyDateTime_DateTime *self, PyObject *args, PyObject *kw)
51735173}
51745174
51755175static PyObject *
5176- datetime_ctime (PyDateTime_DateTime * self )
5176+ datetime_ctime (PyDateTime_DateTime * self , PyObject * Py_UNUSED ( ignored ) )
51775177{
51785178 return format_ctime ((PyDateTime_Date * )self ,
51795179 DATE_GET_HOUR (self ),
@@ -5652,7 +5652,7 @@ datetime_astimezone(PyDateTime_DateTime *self, PyObject *args, PyObject *kw)
56525652}
56535653
56545654static PyObject *
5655- datetime_timetuple (PyDateTime_DateTime * self )
5655+ datetime_timetuple (PyDateTime_DateTime * self , PyObject * Py_UNUSED ( ignored ) )
56565656{
56575657 int dstflag = -1 ;
56585658
@@ -5727,7 +5727,7 @@ local_to_seconds(int year, int month, int day,
57275727#define EPOCH_SECONDS (719163LL * 24 * 60 * 60)
57285728
57295729static PyObject *
5730- datetime_timestamp (PyDateTime_DateTime * self )
5730+ datetime_timestamp (PyDateTime_DateTime * self , PyObject * Py_UNUSED ( ignored ) )
57315731{
57325732 PyObject * result ;
57335733
@@ -5736,7 +5736,7 @@ datetime_timestamp(PyDateTime_DateTime *self)
57365736 delta = datetime_subtract ((PyObject * )self , PyDateTime_Epoch );
57375737 if (delta == NULL )
57385738 return NULL ;
5739- result = delta_total_seconds (delta );
5739+ result = delta_total_seconds (delta , NULL );
57405740 Py_DECREF (delta );
57415741 }
57425742 else {
@@ -5757,15 +5757,15 @@ datetime_timestamp(PyDateTime_DateTime *self)
57575757}
57585758
57595759static PyObject *
5760- datetime_getdate (PyDateTime_DateTime * self )
5760+ datetime_getdate (PyDateTime_DateTime * self , PyObject * Py_UNUSED ( ignored ) )
57615761{
57625762 return new_date (GET_YEAR (self ),
57635763 GET_MONTH (self ),
57645764 GET_DAY (self ));
57655765}
57665766
57675767static PyObject *
5768- datetime_gettime (PyDateTime_DateTime * self )
5768+ datetime_gettime (PyDateTime_DateTime * self , PyObject * Py_UNUSED ( ignored ) )
57695769{
57705770 return new_time (DATE_GET_HOUR (self ),
57715771 DATE_GET_MINUTE (self ),
@@ -5776,7 +5776,7 @@ datetime_gettime(PyDateTime_DateTime *self)
57765776}
57775777
57785778static PyObject *
5779- datetime_gettimetz (PyDateTime_DateTime * self )
5779+ datetime_gettimetz (PyDateTime_DateTime * self , PyObject * Py_UNUSED ( ignored ) )
57805780{
57815781 return new_time (DATE_GET_HOUR (self ),
57825782 DATE_GET_MINUTE (self ),
@@ -5787,7 +5787,7 @@ datetime_gettimetz(PyDateTime_DateTime *self)
57875787}
57885788
57895789static PyObject *
5790- datetime_utctimetuple (PyDateTime_DateTime * self )
5790+ datetime_utctimetuple (PyDateTime_DateTime * self , PyObject * Py_UNUSED ( ignored ) )
57915791{
57925792 int y , m , d , hh , mm , ss ;
57935793 PyObject * tzinfo ;
0 commit comments