diff options
Diffstat (limited to 'Modules/_datetimemodule.c')
| -rw-r--r-- | Modules/_datetimemodule.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Modules/_datetimemodule.c b/Modules/_datetimemodule.c index a35c72395e..24c2198893 100644 --- a/Modules/_datetimemodule.c +++ b/Modules/_datetimemodule.c @@ -3491,7 +3491,7 @@ static PyMethodDef date_methods[] = { METH_CLASS, PyDoc_STR("str -> Construct a date from the output of date.isoformat()")}, - {"fromisocalendar", (PyCFunction)(void(*)(void))date_fromisocalendar, + {"fromisocalendar", _PyCFunction_CAST(date_fromisocalendar), METH_VARARGS | METH_KEYWORDS | METH_CLASS, PyDoc_STR("int, int, int -> Construct a date from the ISO year, week " "number and weekday.\n\n" @@ -3506,7 +3506,7 @@ static PyMethodDef date_methods[] = { {"ctime", (PyCFunction)date_ctime, METH_NOARGS, PyDoc_STR("Return ctime() style string.")}, - {"strftime", (PyCFunction)(void(*)(void))date_strftime, METH_VARARGS | METH_KEYWORDS, + {"strftime", _PyCFunction_CAST(date_strftime), METH_VARARGS | METH_KEYWORDS, PyDoc_STR("format -> strftime() style string.")}, {"__format__", (PyCFunction)date_format, METH_VARARGS, @@ -3534,7 +3534,7 @@ static PyMethodDef date_methods[] = { PyDoc_STR("Return the day of the week represented by the date.\n" "Monday == 0 ... Sunday == 6")}, - {"replace", (PyCFunction)(void(*)(void))date_replace, METH_VARARGS | METH_KEYWORDS, + {"replace", _PyCFunction_CAST(date_replace), METH_VARARGS | METH_KEYWORDS, PyDoc_STR("Return date with new specified fields.")}, {"__reduce__", (PyCFunction)date_reduce, METH_NOARGS, @@ -4644,7 +4644,7 @@ time_reduce(PyDateTime_Time *self, PyObject *arg) static PyMethodDef time_methods[] = { - {"isoformat", (PyCFunction)(void(*)(void))time_isoformat, METH_VARARGS | METH_KEYWORDS, + {"isoformat", _PyCFunction_CAST(time_isoformat), METH_VARARGS | METH_KEYWORDS, PyDoc_STR("Return string in ISO 8601 format, [HH[:MM[:SS[.mmm[uuu]]]]]" "[+HH:MM].\n\n" "The optional argument timespec specifies the number " @@ -4652,7 +4652,7 @@ static PyMethodDef time_methods[] = { "options are 'auto', 'hours', 'minutes',\n'seconds', " "'milliseconds' and 'microseconds'.\n")}, - {"strftime", (PyCFunction)(void(*)(void))time_strftime, METH_VARARGS | METH_KEYWORDS, + {"strftime", _PyCFunction_CAST(time_strftime), METH_VARARGS | METH_KEYWORDS, PyDoc_STR("format -> strftime() style string.")}, {"__format__", (PyCFunction)date_format, METH_VARARGS, @@ -4667,7 +4667,7 @@ static PyMethodDef time_methods[] = { {"dst", (PyCFunction)time_dst, METH_NOARGS, PyDoc_STR("Return self.tzinfo.dst(self).")}, - {"replace", (PyCFunction)(void(*)(void))time_replace, METH_VARARGS | METH_KEYWORDS, + {"replace", _PyCFunction_CAST(time_replace), METH_VARARGS | METH_KEYWORDS, PyDoc_STR("Return time with new specified fields.")}, {"fromisoformat", (PyCFunction)time_fromisoformat, METH_O | METH_CLASS, @@ -6308,7 +6308,7 @@ static PyMethodDef datetime_methods[] = { METH_NOARGS | METH_CLASS, PyDoc_STR("Return a new datetime representing UTC day and time.")}, - {"fromtimestamp", (PyCFunction)(void(*)(void))datetime_fromtimestamp, + {"fromtimestamp", _PyCFunction_CAST(datetime_fromtimestamp), METH_VARARGS | METH_KEYWORDS | METH_CLASS, PyDoc_STR("timestamp[, tz] -> tz's local time from POSIX timestamp.")}, @@ -6321,7 +6321,7 @@ static PyMethodDef datetime_methods[] = { PyDoc_STR("string, format -> new datetime parsed from a string " "(like time.strptime()).")}, - {"combine", (PyCFunction)(void(*)(void))datetime_combine, + {"combine", _PyCFunction_CAST(datetime_combine), METH_VARARGS | METH_KEYWORDS | METH_CLASS, PyDoc_STR("date, time -> datetime with same date and time fields")}, @@ -6352,7 +6352,7 @@ static PyMethodDef datetime_methods[] = { {"utctimetuple", (PyCFunction)datetime_utctimetuple, METH_NOARGS, PyDoc_STR("Return UTC time tuple, compatible with time.localtime().")}, - {"isoformat", (PyCFunction)(void(*)(void))datetime_isoformat, METH_VARARGS | METH_KEYWORDS, + {"isoformat", _PyCFunction_CAST(datetime_isoformat), METH_VARARGS | METH_KEYWORDS, PyDoc_STR("[sep] -> string in ISO 8601 format, " "YYYY-MM-DDT[HH[:MM[:SS[.mmm[uuu]]]]][+HH:MM].\n" "sep is used to separate the year from the time, and " @@ -6371,10 +6371,10 @@ static PyMethodDef datetime_methods[] = { {"dst", (PyCFunction)datetime_dst, METH_NOARGS, PyDoc_STR("Return self.tzinfo.dst(self).")}, - {"replace", (PyCFunction)(void(*)(void))datetime_replace, METH_VARARGS | METH_KEYWORDS, + {"replace", _PyCFunction_CAST(datetime_replace), METH_VARARGS | METH_KEYWORDS, PyDoc_STR("Return datetime with new specified fields.")}, - {"astimezone", (PyCFunction)(void(*)(void))datetime_astimezone, METH_VARARGS | METH_KEYWORDS, + {"astimezone", _PyCFunction_CAST(datetime_astimezone), METH_VARARGS | METH_KEYWORDS, PyDoc_STR("tz -> convert to local time in new timezone tz\n")}, {"__reduce_ex__", (PyCFunction)datetime_reduce_ex, METH_VARARGS, |
