diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2018-11-27 09:27:36 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-27 09:27:36 (GMT) |
commit | 4a934d490fac779d8954a8292369c4506bab23fa (patch) | |
tree | c481c9a26efba1d156bb04959a12e2aac3d2deff /Objects/clinic/odictobject.c.h | |
parent | b619b097923155a7034c05c4018bf06af9f994d0 (diff) | |
download | cpython-4a934d490fac779d8954a8292369c4506bab23fa.zip cpython-4a934d490fac779d8954a8292369c4506bab23fa.tar.gz cpython-4a934d490fac779d8954a8292369c4506bab23fa.tar.bz2 |
bpo-33012: Fix invalid function cast warnings with gcc 8 in Argument Clinic. (GH-6748)
Fix invalid function cast warnings with gcc 8
for method conventions different from METH_NOARGS, METH_O and
METH_VARARGS in Argument Clinic generated code.
Diffstat (limited to 'Objects/clinic/odictobject.c.h')
-rw-r--r-- | Objects/clinic/odictobject.c.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Objects/clinic/odictobject.c.h b/Objects/clinic/odictobject.c.h index 15a8bec..1aea36e 100644 --- a/Objects/clinic/odictobject.c.h +++ b/Objects/clinic/odictobject.c.h @@ -9,7 +9,7 @@ PyDoc_STRVAR(OrderedDict_fromkeys__doc__, "Create a new ordered dictionary with keys from iterable and values set to value."); #define ORDEREDDICT_FROMKEYS_METHODDEF \ - {"fromkeys", (PyCFunction)OrderedDict_fromkeys, METH_FASTCALL|METH_KEYWORDS|METH_CLASS, OrderedDict_fromkeys__doc__}, + {"fromkeys", (PyCFunction)(void(*)(void))OrderedDict_fromkeys, METH_FASTCALL|METH_KEYWORDS|METH_CLASS, OrderedDict_fromkeys__doc__}, static PyObject * OrderedDict_fromkeys_impl(PyTypeObject *type, PyObject *seq, PyObject *value); @@ -42,7 +42,7 @@ PyDoc_STRVAR(OrderedDict_setdefault__doc__, "Return the value for key if key is in the dictionary, else default."); #define ORDEREDDICT_SETDEFAULT_METHODDEF \ - {"setdefault", (PyCFunction)OrderedDict_setdefault, METH_FASTCALL|METH_KEYWORDS, OrderedDict_setdefault__doc__}, + {"setdefault", (PyCFunction)(void(*)(void))OrderedDict_setdefault, METH_FASTCALL|METH_KEYWORDS, OrderedDict_setdefault__doc__}, static PyObject * OrderedDict_setdefault_impl(PyODictObject *self, PyObject *key, @@ -76,7 +76,7 @@ PyDoc_STRVAR(OrderedDict_popitem__doc__, "Pairs are returned in LIFO order if last is true or FIFO order if false."); #define ORDEREDDICT_POPITEM_METHODDEF \ - {"popitem", (PyCFunction)OrderedDict_popitem, METH_FASTCALL|METH_KEYWORDS, OrderedDict_popitem__doc__}, + {"popitem", (PyCFunction)(void(*)(void))OrderedDict_popitem, METH_FASTCALL|METH_KEYWORDS, OrderedDict_popitem__doc__}, static PyObject * OrderedDict_popitem_impl(PyODictObject *self, int last); @@ -108,7 +108,7 @@ PyDoc_STRVAR(OrderedDict_move_to_end__doc__, "Raise KeyError if the element does not exist."); #define ORDEREDDICT_MOVE_TO_END_METHODDEF \ - {"move_to_end", (PyCFunction)OrderedDict_move_to_end, METH_FASTCALL|METH_KEYWORDS, OrderedDict_move_to_end__doc__}, + {"move_to_end", (PyCFunction)(void(*)(void))OrderedDict_move_to_end, METH_FASTCALL|METH_KEYWORDS, OrderedDict_move_to_end__doc__}, static PyObject * OrderedDict_move_to_end_impl(PyODictObject *self, PyObject *key, int last); @@ -131,4 +131,4 @@ OrderedDict_move_to_end(PyODictObject *self, PyObject *const *args, Py_ssize_t n exit: return return_value; } -/*[clinic end generated code: output=7f23d569eda2a558 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=f6f189e1fe032e0b input=a9049054013a1b77]*/ |