@@ -2590,7 +2590,7 @@ delta_getstate(PyDateTime_Delta *self)
2590
2590
}
2591
2591
2592
2592
static PyObject *
2593
- delta_total_seconds (PyObject * self )
2593
+ delta_total_seconds (PyObject * self , PyObject * Py_UNUSED ( ignored ) )
2594
2594
{
2595
2595
PyObject * total_seconds ;
2596
2596
PyObject * total_microseconds ;
@@ -2606,7 +2606,7 @@ delta_total_seconds(PyObject *self)
2606
2606
}
2607
2607
2608
2608
static PyObject *
2609
- delta_reduce (PyDateTime_Delta * self )
2609
+ delta_reduce (PyDateTime_Delta * self , PyObject * Py_UNUSED ( ignored ) )
2610
2610
{
2611
2611
return Py_BuildValue ("ON" , Py_TYPE (self ), delta_getstate (self ));
2612
2612
}
@@ -2627,7 +2627,7 @@ static PyMemberDef delta_members[] = {
2627
2627
};
2628
2628
2629
2629
static PyMethodDef delta_methods [] = {
2630
- {"total_seconds" , ( PyCFunction ) delta_total_seconds , METH_NOARGS ,
2630
+ {"total_seconds" , delta_total_seconds , METH_NOARGS ,
2631
2631
PyDoc_STR ("Total seconds in the duration." )},
2632
2632
2633
2633
{"__reduce__" , (PyCFunction )delta_reduce , METH_NOARGS ,
@@ -2991,7 +2991,7 @@ date_repr(PyDateTime_Date *self)
2991
2991
}
2992
2992
2993
2993
static PyObject *
2994
- date_isoformat (PyDateTime_Date * self )
2994
+ date_isoformat (PyDateTime_Date * self , PyObject * Py_UNUSED ( ignored ) )
2995
2995
{
2996
2996
return PyUnicode_FromFormat ("%04d-%02d-%02d" ,
2997
2997
GET_YEAR (self ), GET_MONTH (self ), GET_DAY (self ));
@@ -3006,7 +3006,7 @@ date_str(PyDateTime_Date *self)
3006
3006
3007
3007
3008
3008
static PyObject *
3009
- date_ctime (PyDateTime_Date * self )
3009
+ date_ctime (PyDateTime_Date * self , PyObject * Py_UNUSED ( ignored ) )
3010
3010
{
3011
3011
return format_ctime (self , 0 , 0 , 0 );
3012
3012
}
@@ -3055,15 +3055,15 @@ date_format(PyDateTime_Date *self, PyObject *args)
3055
3055
/* ISO methods. */
3056
3056
3057
3057
static PyObject *
3058
- date_isoweekday (PyDateTime_Date * self )
3058
+ date_isoweekday (PyDateTime_Date * self , PyObject * Py_UNUSED ( ignored ) )
3059
3059
{
3060
3060
int dow = weekday (GET_YEAR (self ), GET_MONTH (self ), GET_DAY (self ));
3061
3061
3062
3062
return PyLong_FromLong (dow + 1 );
3063
3063
}
3064
3064
3065
3065
static PyObject *
3066
- date_isocalendar (PyDateTime_Date * self )
3066
+ date_isocalendar (PyDateTime_Date * self , PyObject * Py_UNUSED ( ignored ) )
3067
3067
{
3068
3068
int year = GET_YEAR (self );
3069
3069
int week1_monday = iso_week1_monday (year );
@@ -3100,7 +3100,7 @@ date_richcompare(PyObject *self, PyObject *other, int op)
3100
3100
}
3101
3101
3102
3102
static PyObject *
3103
- date_timetuple (PyDateTime_Date * self )
3103
+ date_timetuple (PyDateTime_Date * self , PyObject * Py_UNUSED ( ignored ) )
3104
3104
{
3105
3105
return build_struct_time (GET_YEAR (self ),
3106
3106
GET_MONTH (self ),
@@ -3149,14 +3149,14 @@ date_hash(PyDateTime_Date *self)
3149
3149
}
3150
3150
3151
3151
static PyObject *
3152
- date_toordinal (PyDateTime_Date * self )
3152
+ date_toordinal (PyDateTime_Date * self , PyObject * Py_UNUSED ( ignored ) )
3153
3153
{
3154
3154
return PyLong_FromLong (ymd_to_ord (GET_YEAR (self ), GET_MONTH (self ),
3155
3155
GET_DAY (self )));
3156
3156
}
3157
3157
3158
3158
static PyObject *
3159
- date_weekday (PyDateTime_Date * self )
3159
+ date_weekday (PyDateTime_Date * self , PyObject * Py_UNUSED ( ignored ) )
3160
3160
{
3161
3161
int dow = weekday (GET_YEAR (self ), GET_MONTH (self ), GET_DAY (self ));
3162
3162
@@ -3435,7 +3435,7 @@ tzinfo_fromutc(PyDateTime_TZInfo *self, PyObject *dt)
3435
3435
*/
3436
3436
3437
3437
static PyObject *
3438
- tzinfo_reduce (PyObject * self )
3438
+ tzinfo_reduce (PyObject * self , PyObject * Py_UNUSED ( ignored ) )
3439
3439
{
3440
3440
PyObject * args , * state ;
3441
3441
PyObject * getinitargs , * getstate ;
@@ -3502,7 +3502,7 @@ static PyMethodDef tzinfo_methods[] = {
3502
3502
{"fromutc" , (PyCFunction )tzinfo_fromutc , METH_O ,
3503
3503
PyDoc_STR ("datetime in UTC -> datetime in local time." )},
3504
3504
3505
- {"__reduce__" , ( PyCFunction ) tzinfo_reduce , METH_NOARGS ,
3505
+ {"__reduce__" , tzinfo_reduce , METH_NOARGS ,
3506
3506
PyDoc_STR ("-> (cls, state)" )},
3507
3507
3508
3508
{NULL , NULL }
@@ -3720,7 +3720,7 @@ timezone_fromutc(PyDateTime_TimeZone *self, PyDateTime_DateTime *dt)
3720
3720
}
3721
3721
3722
3722
static PyObject *
3723
- timezone_getinitargs (PyDateTime_TimeZone * self )
3723
+ timezone_getinitargs (PyDateTime_TimeZone * self , PyObject * Py_UNUSED ( ignored ) )
3724
3724
{
3725
3725
if (self -> name == NULL )
3726
3726
return Py_BuildValue ("(O)" , self -> offset );
@@ -5173,7 +5173,7 @@ datetime_isoformat(PyDateTime_DateTime *self, PyObject *args, PyObject *kw)
5173
5173
}
5174
5174
5175
5175
static PyObject *
5176
- datetime_ctime (PyDateTime_DateTime * self )
5176
+ datetime_ctime (PyDateTime_DateTime * self , PyObject * Py_UNUSED ( ignored ) )
5177
5177
{
5178
5178
return format_ctime ((PyDateTime_Date * )self ,
5179
5179
DATE_GET_HOUR (self ),
@@ -5652,7 +5652,7 @@ datetime_astimezone(PyDateTime_DateTime *self, PyObject *args, PyObject *kw)
5652
5652
}
5653
5653
5654
5654
static PyObject *
5655
- datetime_timetuple (PyDateTime_DateTime * self )
5655
+ datetime_timetuple (PyDateTime_DateTime * self , PyObject * Py_UNUSED ( ignored ) )
5656
5656
{
5657
5657
int dstflag = -1 ;
5658
5658
@@ -5727,7 +5727,7 @@ local_to_seconds(int year, int month, int day,
5727
5727
#define EPOCH_SECONDS (719163LL * 24 * 60 * 60)
5728
5728
5729
5729
static PyObject *
5730
- datetime_timestamp (PyDateTime_DateTime * self )
5730
+ datetime_timestamp (PyDateTime_DateTime * self , PyObject * Py_UNUSED ( ignored ) )
5731
5731
{
5732
5732
PyObject * result ;
5733
5733
@@ -5736,7 +5736,7 @@ datetime_timestamp(PyDateTime_DateTime *self)
5736
5736
delta = datetime_subtract ((PyObject * )self , PyDateTime_Epoch );
5737
5737
if (delta == NULL )
5738
5738
return NULL ;
5739
- result = delta_total_seconds (delta );
5739
+ result = delta_total_seconds (delta , NULL );
5740
5740
Py_DECREF (delta );
5741
5741
}
5742
5742
else {
@@ -5757,15 +5757,15 @@ datetime_timestamp(PyDateTime_DateTime *self)
5757
5757
}
5758
5758
5759
5759
static PyObject *
5760
- datetime_getdate (PyDateTime_DateTime * self )
5760
+ datetime_getdate (PyDateTime_DateTime * self , PyObject * Py_UNUSED ( ignored ) )
5761
5761
{
5762
5762
return new_date (GET_YEAR (self ),
5763
5763
GET_MONTH (self ),
5764
5764
GET_DAY (self ));
5765
5765
}
5766
5766
5767
5767
static PyObject *
5768
- datetime_gettime (PyDateTime_DateTime * self )
5768
+ datetime_gettime (PyDateTime_DateTime * self , PyObject * Py_UNUSED ( ignored ) )
5769
5769
{
5770
5770
return new_time (DATE_GET_HOUR (self ),
5771
5771
DATE_GET_MINUTE (self ),
@@ -5776,7 +5776,7 @@ datetime_gettime(PyDateTime_DateTime *self)
5776
5776
}
5777
5777
5778
5778
static PyObject *
5779
- datetime_gettimetz (PyDateTime_DateTime * self )
5779
+ datetime_gettimetz (PyDateTime_DateTime * self , PyObject * Py_UNUSED ( ignored ) )
5780
5780
{
5781
5781
return new_time (DATE_GET_HOUR (self ),
5782
5782
DATE_GET_MINUTE (self ),
@@ -5787,7 +5787,7 @@ datetime_gettimetz(PyDateTime_DateTime *self)
5787
5787
}
5788
5788
5789
5789
static PyObject *
5790
- datetime_utctimetuple (PyDateTime_DateTime * self )
5790
+ datetime_utctimetuple (PyDateTime_DateTime * self , PyObject * Py_UNUSED ( ignored ) )
5791
5791
{
5792
5792
int y , m , d , hh , mm , ss ;
5793
5793
PyObject * tzinfo ;
0 commit comments