mirror of
https://github.com/python/cpython.git
synced 2025-09-13 12:17:24 +00:00
bpo-33012: Fix invalid function cast warnings with gcc 8. (GH-6749)
Fix invalid function cast warnings with gcc 8 for method conventions different from METH_NOARGS, METH_O and METH_VARARGS excluding Argument Clinic generated code.
This commit is contained in:
parent
81524022d0
commit
62be74290a
38 changed files with 174 additions and 174 deletions
|
@ -3255,7 +3255,7 @@ static PyMethodDef date_methods[] = {
|
|||
{"ctime", (PyCFunction)date_ctime, METH_NOARGS,
|
||||
PyDoc_STR("Return ctime() style string.")},
|
||||
|
||||
{"strftime", (PyCFunction)date_strftime, METH_VARARGS | METH_KEYWORDS,
|
||||
{"strftime", (PyCFunction)(void(*)(void))date_strftime, METH_VARARGS | METH_KEYWORDS,
|
||||
PyDoc_STR("format -> strftime() style string.")},
|
||||
|
||||
{"__format__", (PyCFunction)date_format, METH_VARARGS,
|
||||
|
@ -3283,7 +3283,7 @@ static PyMethodDef date_methods[] = {
|
|||
PyDoc_STR("Return the day of the week represented by the date.\n"
|
||||
"Monday == 0 ... Sunday == 6")},
|
||||
|
||||
{"replace", (PyCFunction)date_replace, METH_VARARGS | METH_KEYWORDS,
|
||||
{"replace", (PyCFunction)(void(*)(void))date_replace, METH_VARARGS | METH_KEYWORDS,
|
||||
PyDoc_STR("Return date with new specified fields.")},
|
||||
|
||||
{"__reduce__", (PyCFunction)date_reduce, METH_NOARGS,
|
||||
|
@ -4392,12 +4392,12 @@ time_reduce(PyDateTime_Time *self, PyObject *arg)
|
|||
|
||||
static PyMethodDef time_methods[] = {
|
||||
|
||||
{"isoformat", (PyCFunction)time_isoformat, METH_VARARGS | METH_KEYWORDS,
|
||||
{"isoformat", (PyCFunction)(void(*)(void))time_isoformat, METH_VARARGS | METH_KEYWORDS,
|
||||
PyDoc_STR("Return string in ISO 8601 format, [HH[:MM[:SS[.mmm[uuu]]]]]"
|
||||
"[+HH:MM].\n\n"
|
||||
"timespec specifies what components of the time to include.\n")},
|
||||
|
||||
{"strftime", (PyCFunction)time_strftime, METH_VARARGS | METH_KEYWORDS,
|
||||
{"strftime", (PyCFunction)(void(*)(void))time_strftime, METH_VARARGS | METH_KEYWORDS,
|
||||
PyDoc_STR("format -> strftime() style string.")},
|
||||
|
||||
{"__format__", (PyCFunction)date_format, METH_VARARGS,
|
||||
|
@ -4412,7 +4412,7 @@ static PyMethodDef time_methods[] = {
|
|||
{"dst", (PyCFunction)time_dst, METH_NOARGS,
|
||||
PyDoc_STR("Return self.tzinfo.dst(self).")},
|
||||
|
||||
{"replace", (PyCFunction)time_replace, METH_VARARGS | METH_KEYWORDS,
|
||||
{"replace", (PyCFunction)(void(*)(void))time_replace, METH_VARARGS | METH_KEYWORDS,
|
||||
PyDoc_STR("Return time with new specified fields.")},
|
||||
|
||||
{"fromisoformat", (PyCFunction)time_fromisoformat, METH_O | METH_CLASS,
|
||||
|
@ -6025,7 +6025,7 @@ static PyMethodDef datetime_methods[] = {
|
|||
METH_NOARGS | METH_CLASS,
|
||||
PyDoc_STR("Return a new datetime representing UTC day and time.")},
|
||||
|
||||
{"fromtimestamp", (PyCFunction)datetime_fromtimestamp,
|
||||
{"fromtimestamp", (PyCFunction)(void(*)(void))datetime_fromtimestamp,
|
||||
METH_VARARGS | METH_KEYWORDS | METH_CLASS,
|
||||
PyDoc_STR("timestamp[, tz] -> tz's local time from POSIX timestamp.")},
|
||||
|
||||
|
@ -6038,7 +6038,7 @@ static PyMethodDef datetime_methods[] = {
|
|||
PyDoc_STR("string, format -> new datetime parsed from a string "
|
||||
"(like time.strptime()).")},
|
||||
|
||||
{"combine", (PyCFunction)datetime_combine,
|
||||
{"combine", (PyCFunction)(void(*)(void))datetime_combine,
|
||||
METH_VARARGS | METH_KEYWORDS | METH_CLASS,
|
||||
PyDoc_STR("date, time -> datetime with same date and time fields")},
|
||||
|
||||
|
@ -6069,7 +6069,7 @@ static PyMethodDef datetime_methods[] = {
|
|||
{"utctimetuple", (PyCFunction)datetime_utctimetuple, METH_NOARGS,
|
||||
PyDoc_STR("Return UTC time tuple, compatible with time.localtime().")},
|
||||
|
||||
{"isoformat", (PyCFunction)datetime_isoformat, METH_VARARGS | METH_KEYWORDS,
|
||||
{"isoformat", (PyCFunction)(void(*)(void))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 "
|
||||
|
@ -6087,10 +6087,10 @@ static PyMethodDef datetime_methods[] = {
|
|||
{"dst", (PyCFunction)datetime_dst, METH_NOARGS,
|
||||
PyDoc_STR("Return self.tzinfo.dst(self).")},
|
||||
|
||||
{"replace", (PyCFunction)datetime_replace, METH_VARARGS | METH_KEYWORDS,
|
||||
{"replace", (PyCFunction)(void(*)(void))datetime_replace, METH_VARARGS | METH_KEYWORDS,
|
||||
PyDoc_STR("Return datetime with new specified fields.")},
|
||||
|
||||
{"astimezone", (PyCFunction)datetime_astimezone, METH_VARARGS | METH_KEYWORDS,
|
||||
{"astimezone", (PyCFunction)(void(*)(void))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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue