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:
Serhiy Storchaka 2018-11-27 13:27:31 +02:00 committed by GitHub
parent 81524022d0
commit 62be74290a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
38 changed files with 174 additions and 174 deletions

View file

@ -3095,15 +3095,15 @@ PyDoc_STRVAR(values__doc__,
static PyMethodDef mapp_methods[] = {
DICT___CONTAINS___METHODDEF
{"__getitem__", (PyCFunction)dict_subscript, METH_O | METH_COEXIST,
{"__getitem__", (PyCFunction)(void(*)(void))dict_subscript, METH_O | METH_COEXIST,
getitem__doc__},
{"__sizeof__", (PyCFunction)dict_sizeof, METH_NOARGS,
{"__sizeof__", (PyCFunction)(void(*)(void))dict_sizeof, METH_NOARGS,
sizeof__doc__},
DICT_GET_METHODDEF
DICT_SETDEFAULT_METHODDEF
{"pop", (PyCFunction)dict_pop, METH_VARARGS,
pop__doc__},
{"popitem", (PyCFunction)dict_popitem, METH_NOARGS,
{"popitem", (PyCFunction)(void(*)(void))dict_popitem, METH_NOARGS,
popitem__doc__},
{"keys", dictkeys_new, METH_NOARGS,
keys__doc__},
@ -3111,7 +3111,7 @@ static PyMethodDef mapp_methods[] = {
items__doc__},
{"values", dictvalues_new, METH_NOARGS,
values__doc__},
{"update", (PyCFunction)dict_update, METH_VARARGS | METH_KEYWORDS,
{"update", (PyCFunction)(void(*)(void))dict_update, METH_VARARGS | METH_KEYWORDS,
update__doc__},
DICT_FROMKEYS_METHODDEF
{"clear", (PyCFunction)dict_clear, METH_NOARGS,
@ -3420,9 +3420,9 @@ dictiter_reduce(dictiterobject *di, PyObject *Py_UNUSED(ignored));
PyDoc_STRVAR(reduce_doc, "Return state information for pickling.");
static PyMethodDef dictiter_methods[] = {
{"__length_hint__", (PyCFunction)dictiter_len, METH_NOARGS,
{"__length_hint__", (PyCFunction)(void(*)(void))dictiter_len, METH_NOARGS,
length_hint_doc},
{"__reduce__", (PyCFunction)dictiter_reduce, METH_NOARGS,
{"__reduce__", (PyCFunction)(void(*)(void))dictiter_reduce, METH_NOARGS,
reduce_doc},
{NULL, NULL} /* sentinel */
};
@ -4209,7 +4209,7 @@ PyDoc_STRVAR(reversed_keys_doc,
static PyMethodDef dictkeys_methods[] = {
{"isdisjoint", (PyCFunction)dictviews_isdisjoint, METH_O,
isdisjoint_doc},
{"__reversed__", (PyCFunction)dictkeys_reversed, METH_NOARGS,
{"__reversed__", (PyCFunction)(void(*)(void))dictkeys_reversed, METH_NOARGS,
reversed_keys_doc},
{NULL, NULL} /* sentinel */
};
@ -4315,7 +4315,7 @@ PyDoc_STRVAR(reversed_items_doc,
static PyMethodDef dictitems_methods[] = {
{"isdisjoint", (PyCFunction)dictviews_isdisjoint, METH_O,
isdisjoint_doc},
{"__reversed__", (PyCFunction)dictitems_reversed, METH_NOARGS,
{"__reversed__", (PyCFunction)(void(*)(void))dictitems_reversed, METH_NOARGS,
reversed_items_doc},
{NULL, NULL} /* sentinel */
};
@ -4396,7 +4396,7 @@ PyDoc_STRVAR(reversed_values_doc,
"Return a reverse iterator over the dict values.");
static PyMethodDef dictvalues_methods[] = {
{"__reversed__", (PyCFunction)dictvalues_reversed, METH_NOARGS,
{"__reversed__", (PyCFunction)(void(*)(void))dictvalues_reversed, METH_NOARGS,
reversed_values_doc},
{NULL, NULL} /* sentinel */
};