mirror of
https://github.com/python/cpython.git
synced 2025-07-14 23:05:17 +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
|
@ -1150,7 +1150,7 @@ PyDoc_STRVAR(warn_explicit_doc,
|
|||
|
||||
static PyMethodDef warnings_functions[] = {
|
||||
WARNINGS_WARN_METHODDEF
|
||||
{"warn_explicit", (PyCFunction)warnings_warn_explicit,
|
||||
{"warn_explicit", (PyCFunction)(void(*)(void))warnings_warn_explicit,
|
||||
METH_VARARGS | METH_KEYWORDS, warn_explicit_doc},
|
||||
{"_filters_mutated", (PyCFunction)warnings_filters_mutated, METH_NOARGS,
|
||||
NULL},
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -648,7 +648,7 @@ static PyMethodDef PyContext_methods[] = {
|
|||
_CONTEXTVARS_CONTEXT_KEYS_METHODDEF
|
||||
_CONTEXTVARS_CONTEXT_VALUES_METHODDEF
|
||||
_CONTEXTVARS_CONTEXT_COPY_METHODDEF
|
||||
{"run", (PyCFunction)context_run, METH_FASTCALL | METH_KEYWORDS, NULL},
|
||||
{"run", (PyCFunction)(void(*)(void))context_run, METH_FASTCALL | METH_KEYWORDS, NULL},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
|
|
|
@ -1521,7 +1521,7 @@ sys_getandroidapilevel(PyObject *self)
|
|||
|
||||
static PyMethodDef sys_methods[] = {
|
||||
/* Might as well keep this in alphabetic order */
|
||||
{"breakpointhook", (PyCFunction)sys_breakpointhook,
|
||||
{"breakpointhook", (PyCFunction)(void(*)(void))sys_breakpointhook,
|
||||
METH_FASTCALL | METH_KEYWORDS, breakpointhook_doc},
|
||||
{"callstats", sys_callstats, METH_NOARGS,
|
||||
callstats_doc},
|
||||
|
@ -1560,7 +1560,7 @@ static PyMethodDef sys_methods[] = {
|
|||
{"getrefcount", (PyCFunction)sys_getrefcount, METH_O, getrefcount_doc},
|
||||
{"getrecursionlimit", sys_getrecursionlimit, METH_NOARGS,
|
||||
getrecursionlimit_doc},
|
||||
{"getsizeof", (PyCFunction)sys_getsizeof,
|
||||
{"getsizeof", (PyCFunction)(void(*)(void))sys_getsizeof,
|
||||
METH_VARARGS | METH_KEYWORDS, getsizeof_doc},
|
||||
{"_getframe", sys_getframe, METH_VARARGS, getframe_doc},
|
||||
#ifdef MS_WINDOWS
|
||||
|
@ -1601,7 +1601,7 @@ static PyMethodDef sys_methods[] = {
|
|||
set_coroutine_wrapper_doc},
|
||||
{"get_coroutine_wrapper", sys_get_coroutine_wrapper, METH_NOARGS,
|
||||
get_coroutine_wrapper_doc},
|
||||
{"set_asyncgen_hooks", (PyCFunction)sys_set_asyncgen_hooks,
|
||||
{"set_asyncgen_hooks", (PyCFunction)(void(*)(void))sys_set_asyncgen_hooks,
|
||||
METH_VARARGS | METH_KEYWORDS, set_asyncgen_hooks_doc},
|
||||
{"get_asyncgen_hooks", sys_get_asyncgen_hooks, METH_NOARGS,
|
||||
get_asyncgen_hooks_doc},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue