Fix the C function signature for _collections._tuplegetter.__reduce__. (GH-12180)

Correctly fixes bpo-36197.
This commit is contained in:
Serhiy Storchaka 2019-03-05 18:41:09 +02:00 committed by GitHub
parent b35be4b333
commit adfffc7343
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -2441,7 +2441,7 @@ tuplegetter_dealloc(_tuplegetterobject *self)
} }
static PyObject* 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); 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[] = { static PyMethodDef tuplegetter_methods[] = {
{"__reduce__", (PyCFunction)(void(*)(void))tuplegetter_reduce, METH_NOARGS, NULL}, {"__reduce__", (PyCFunction)tuplegetter_reduce, METH_NOARGS, NULL},
{NULL}, {NULL},
}; };