mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +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
|
@ -2195,7 +2195,7 @@ PyDoc_STRVAR(builtin_sorted__doc__,
|
|||
"reverse flag can be set to request the result in descending order.");
|
||||
|
||||
#define BUILTIN_SORTED_METHODDEF \
|
||||
{"sorted", (PyCFunction)builtin_sorted, METH_FASTCALL | METH_KEYWORDS, builtin_sorted__doc__},
|
||||
{"sorted", (PyCFunction)(void(*)(void))builtin_sorted, METH_FASTCALL | METH_KEYWORDS, builtin_sorted__doc__},
|
||||
|
||||
static PyObject *
|
||||
builtin_sorted(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
|
@ -2691,15 +2691,15 @@ PyTypeObject PyZip_Type = {
|
|||
|
||||
|
||||
static PyMethodDef builtin_methods[] = {
|
||||
{"__build_class__", (PyCFunction)builtin___build_class__,
|
||||
{"__build_class__", (PyCFunction)(void(*)(void))builtin___build_class__,
|
||||
METH_FASTCALL | METH_KEYWORDS, build_class_doc},
|
||||
{"__import__", (PyCFunction)builtin___import__, METH_VARARGS | METH_KEYWORDS, import_doc},
|
||||
{"__import__", (PyCFunction)(void(*)(void))builtin___import__, METH_VARARGS | METH_KEYWORDS, import_doc},
|
||||
BUILTIN_ABS_METHODDEF
|
||||
BUILTIN_ALL_METHODDEF
|
||||
BUILTIN_ANY_METHODDEF
|
||||
BUILTIN_ASCII_METHODDEF
|
||||
BUILTIN_BIN_METHODDEF
|
||||
{"breakpoint", (PyCFunction)builtin_breakpoint, METH_FASTCALL | METH_KEYWORDS, breakpoint_doc},
|
||||
{"breakpoint", (PyCFunction)(void(*)(void))builtin_breakpoint, METH_FASTCALL | METH_KEYWORDS, breakpoint_doc},
|
||||
BUILTIN_CALLABLE_METHODDEF
|
||||
BUILTIN_CHR_METHODDEF
|
||||
BUILTIN_COMPILE_METHODDEF
|
||||
|
@ -2709,7 +2709,7 @@ static PyMethodDef builtin_methods[] = {
|
|||
BUILTIN_EVAL_METHODDEF
|
||||
BUILTIN_EXEC_METHODDEF
|
||||
BUILTIN_FORMAT_METHODDEF
|
||||
{"getattr", (PyCFunction)builtin_getattr, METH_FASTCALL, getattr_doc},
|
||||
{"getattr", (PyCFunction)(void(*)(void))builtin_getattr, METH_FASTCALL, getattr_doc},
|
||||
BUILTIN_GLOBALS_METHODDEF
|
||||
BUILTIN_HASATTR_METHODDEF
|
||||
BUILTIN_HASH_METHODDEF
|
||||
|
@ -2721,13 +2721,13 @@ static PyMethodDef builtin_methods[] = {
|
|||
{"iter", builtin_iter, METH_VARARGS, iter_doc},
|
||||
BUILTIN_LEN_METHODDEF
|
||||
BUILTIN_LOCALS_METHODDEF
|
||||
{"max", (PyCFunction)builtin_max, METH_VARARGS | METH_KEYWORDS, max_doc},
|
||||
{"min", (PyCFunction)builtin_min, METH_VARARGS | METH_KEYWORDS, min_doc},
|
||||
{"next", (PyCFunction)builtin_next, METH_FASTCALL, next_doc},
|
||||
{"max", (PyCFunction)(void(*)(void))builtin_max, METH_VARARGS | METH_KEYWORDS, max_doc},
|
||||
{"min", (PyCFunction)(void(*)(void))builtin_min, METH_VARARGS | METH_KEYWORDS, min_doc},
|
||||
{"next", (PyCFunction)(void(*)(void))builtin_next, METH_FASTCALL, next_doc},
|
||||
BUILTIN_OCT_METHODDEF
|
||||
BUILTIN_ORD_METHODDEF
|
||||
BUILTIN_POW_METHODDEF
|
||||
{"print", (PyCFunction)builtin_print, METH_FASTCALL | METH_KEYWORDS, print_doc},
|
||||
{"print", (PyCFunction)(void(*)(void))builtin_print, METH_FASTCALL | METH_KEYWORDS, print_doc},
|
||||
BUILTIN_REPR_METHODDEF
|
||||
BUILTIN_ROUND_METHODDEF
|
||||
BUILTIN_SETATTR_METHODDEF
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue