mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15: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
|
@ -206,15 +206,15 @@ static PyObject* parser_st2tuple(PyST_Object *, PyObject *, PyObject *);
|
|||
#define PUBLIC_METHOD_TYPE (METH_VARARGS|METH_KEYWORDS)
|
||||
|
||||
static PyMethodDef parser_methods[] = {
|
||||
{"compile", (PyCFunction)parser_compilest, PUBLIC_METHOD_TYPE,
|
||||
{"compile", (PyCFunction)(void(*)(void))parser_compilest, PUBLIC_METHOD_TYPE,
|
||||
PyDoc_STR("Compile this ST object into a code object.")},
|
||||
{"isexpr", (PyCFunction)parser_isexpr, PUBLIC_METHOD_TYPE,
|
||||
{"isexpr", (PyCFunction)(void(*)(void))parser_isexpr, PUBLIC_METHOD_TYPE,
|
||||
PyDoc_STR("Determines if this ST object was created from an expression.")},
|
||||
{"issuite", (PyCFunction)parser_issuite, PUBLIC_METHOD_TYPE,
|
||||
{"issuite", (PyCFunction)(void(*)(void))parser_issuite, PUBLIC_METHOD_TYPE,
|
||||
PyDoc_STR("Determines if this ST object was created from a suite.")},
|
||||
{"tolist", (PyCFunction)parser_st2list, PUBLIC_METHOD_TYPE,
|
||||
{"tolist", (PyCFunction)(void(*)(void))parser_st2list, PUBLIC_METHOD_TYPE,
|
||||
PyDoc_STR("Creates a list-tree representation of this ST.")},
|
||||
{"totuple", (PyCFunction)parser_st2tuple, PUBLIC_METHOD_TYPE,
|
||||
{"totuple", (PyCFunction)(void(*)(void))parser_st2tuple, PUBLIC_METHOD_TYPE,
|
||||
PyDoc_STR("Creates a tuple-tree representation of this ST.")},
|
||||
{"__sizeof__", (PyCFunction)parser_sizeof, METH_NOARGS,
|
||||
PyDoc_STR("Returns size in memory, in bytes.")},
|
||||
|
@ -1087,23 +1087,23 @@ parser__pickler(PyObject *self, PyObject *args)
|
|||
* inheritance.
|
||||
*/
|
||||
static PyMethodDef parser_functions[] = {
|
||||
{"compilest", (PyCFunction)parser_compilest, PUBLIC_METHOD_TYPE,
|
||||
{"compilest", (PyCFunction)(void(*)(void))parser_compilest, PUBLIC_METHOD_TYPE,
|
||||
PyDoc_STR("Compiles an ST object into a code object.")},
|
||||
{"expr", (PyCFunction)parser_expr, PUBLIC_METHOD_TYPE,
|
||||
{"expr", (PyCFunction)(void(*)(void))parser_expr, PUBLIC_METHOD_TYPE,
|
||||
PyDoc_STR("Creates an ST object from an expression.")},
|
||||
{"isexpr", (PyCFunction)parser_isexpr, PUBLIC_METHOD_TYPE,
|
||||
{"isexpr", (PyCFunction)(void(*)(void))parser_isexpr, PUBLIC_METHOD_TYPE,
|
||||
PyDoc_STR("Determines if an ST object was created from an expression.")},
|
||||
{"issuite", (PyCFunction)parser_issuite, PUBLIC_METHOD_TYPE,
|
||||
{"issuite", (PyCFunction)(void(*)(void))parser_issuite, PUBLIC_METHOD_TYPE,
|
||||
PyDoc_STR("Determines if an ST object was created from a suite.")},
|
||||
{"suite", (PyCFunction)parser_suite, PUBLIC_METHOD_TYPE,
|
||||
{"suite", (PyCFunction)(void(*)(void))parser_suite, PUBLIC_METHOD_TYPE,
|
||||
PyDoc_STR("Creates an ST object from a suite.")},
|
||||
{"sequence2st", (PyCFunction)parser_tuple2st, PUBLIC_METHOD_TYPE,
|
||||
{"sequence2st", (PyCFunction)(void(*)(void))parser_tuple2st, PUBLIC_METHOD_TYPE,
|
||||
PyDoc_STR("Creates an ST object from a tree representation.")},
|
||||
{"st2tuple", (PyCFunction)parser_st2tuple, PUBLIC_METHOD_TYPE,
|
||||
{"st2tuple", (PyCFunction)(void(*)(void))parser_st2tuple, PUBLIC_METHOD_TYPE,
|
||||
PyDoc_STR("Creates a tuple-tree representation of an ST.")},
|
||||
{"st2list", (PyCFunction)parser_st2list, PUBLIC_METHOD_TYPE,
|
||||
{"st2list", (PyCFunction)(void(*)(void))parser_st2list, PUBLIC_METHOD_TYPE,
|
||||
PyDoc_STR("Creates a list-tree representation of an ST.")},
|
||||
{"tuple2st", (PyCFunction)parser_tuple2st, PUBLIC_METHOD_TYPE,
|
||||
{"tuple2st", (PyCFunction)(void(*)(void))parser_tuple2st, PUBLIC_METHOD_TYPE,
|
||||
PyDoc_STR("Creates an ST object from a tree representation.")},
|
||||
|
||||
/* private stuff: support pickle module */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue