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 /Objects/dictobject.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 'Objects/dictobject.c')
-rw-r--r-- | Objects/dictobject.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c index 2f108bd..72cb4c5 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -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 */ }; |