diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2019-03-05 16:41:09 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-05 16:41:09 (GMT) |
commit | adfffc7343ce7ebc88ec734a803d3247ba8927fb (patch) | |
tree | 18556caba971d0a603c65079c5be5d9a89bbb7e3 | |
parent | b35be4b3334fbc471a39abbeb68110867b72e3e5 (diff) | |
download | cpython-adfffc7343ce7ebc88ec734a803d3247ba8927fb.zip cpython-adfffc7343ce7ebc88ec734a803d3247ba8927fb.tar.gz cpython-adfffc7343ce7ebc88ec734a803d3247ba8927fb.tar.bz2 |
Fix the C function signature for _collections._tuplegetter.__reduce__. (GH-12180)
Correctly fixes bpo-36197.
-rw-r--r-- | Modules/_collectionsmodule.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_collectionsmodule.c b/Modules/_collectionsmodule.c index afd2731..8fb5fc2 100644 --- a/Modules/_collectionsmodule.c +++ b/Modules/_collectionsmodule.c @@ -2441,7 +2441,7 @@ tuplegetter_dealloc(_tuplegetterobject *self) } static PyObject* -tuplegetter_reduce(_tuplegetterobject *self) +tuplegetter_reduce(_tuplegetterobject *self, PyObject *Py_UNUSED(ignored)) { return Py_BuildValue("(O(nO))", (PyObject*) Py_TYPE(self), self->index, self->doc); } @@ -2453,7 +2453,7 @@ static PyMemberDef tuplegetter_members[] = { }; static PyMethodDef tuplegetter_methods[] = { - {"__reduce__", (PyCFunction)(void(*)(void))tuplegetter_reduce, METH_NOARGS, NULL}, + {"__reduce__", (PyCFunction)tuplegetter_reduce, METH_NOARGS, NULL}, {NULL}, }; |