diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2018-11-27 11:27:31 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-27 11:27:31 (GMT) |
commit | 62be74290aca26d16f3f55ece7ff6dad14e60e8d (patch) | |
tree | 656625bee7ca61fd87c6370407162522d8fb277f /Python/bltinmodule.c | |
parent | 81524022d0c0df7a41f9b2b2df41e2ebe140e610 (diff) | |
download | cpython-62be74290aca26d16f3f55ece7ff6dad14e60e8d.zip cpython-62be74290aca26d16f3f55ece7ff6dad14e60e8d.tar.gz cpython-62be74290aca26d16f3f55ece7ff6dad14e60e8d.tar.bz2 |
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.
Diffstat (limited to 'Python/bltinmodule.c')
-rw-r--r-- | Python/bltinmodule.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index f0d342a..e19bc56 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -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 |