gh-111178: Fix function signatures for test_os (#131227)

This commit is contained in:
Victor Stinner 2025-03-14 14:53:06 +01:00 committed by GitHub
parent ca7fd814e4
commit db62557e3d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 11 additions and 6 deletions

View file

@ -334,8 +334,9 @@ structseq_repr(PyObject *op)
static PyObject *
structseq_reduce(PyStructSequence* self, PyObject *Py_UNUSED(ignored))
structseq_reduce(PyObject *op, PyObject *Py_UNUSED(ignored))
{
PyStructSequence *self = (PyStructSequence*)op;
PyObject* tup = NULL;
PyObject* dict = NULL;
PyObject* result;
@ -379,8 +380,9 @@ structseq_reduce(PyStructSequence* self, PyObject *Py_UNUSED(ignored))
static PyObject *
structseq_replace(PyStructSequence *self, PyObject *args, PyObject *kwargs)
structseq_replace(PyObject *op, PyObject *args, PyObject *kwargs)
{
PyStructSequence *self = (PyStructSequence*)op;
PyStructSequence *result = NULL;
Py_ssize_t n_fields, n_unnamed_fields, i;
@ -449,7 +451,7 @@ structseq_replace(PyStructSequence *self, PyObject *args, PyObject *kwargs)
}
static PyMethodDef structseq_methods[] = {
{"__reduce__", (PyCFunction)structseq_reduce, METH_NOARGS, NULL},
{"__reduce__", structseq_reduce, METH_NOARGS, NULL},
{"__replace__", _PyCFunction_CAST(structseq_replace), METH_VARARGS | METH_KEYWORDS,
PyDoc_STR("__replace__($self, /, **changes)\n--\n\n"
"Return a copy of the structure with new values for the specified fields.")},