@@ -334,8 +334,9 @@ structseq_repr(PyObject *op)
334
334
335
335
336
336
static PyObject *
337
- structseq_reduce (PyStructSequence * self , PyObject * Py_UNUSED (ignored ))
337
+ structseq_reduce (PyObject * op , PyObject * Py_UNUSED (ignored ))
338
338
{
339
+ PyStructSequence * self = (PyStructSequence * )op ;
339
340
PyObject * tup = NULL ;
340
341
PyObject * dict = NULL ;
341
342
PyObject * result ;
@@ -379,8 +380,9 @@ structseq_reduce(PyStructSequence* self, PyObject *Py_UNUSED(ignored))
379
380
380
381
381
382
static PyObject *
382
- structseq_replace (PyStructSequence * self , PyObject * args , PyObject * kwargs )
383
+ structseq_replace (PyObject * op , PyObject * args , PyObject * kwargs )
383
384
{
385
+ PyStructSequence * self = (PyStructSequence * )op ;
384
386
PyStructSequence * result = NULL ;
385
387
Py_ssize_t n_fields , n_unnamed_fields , i ;
386
388
@@ -449,7 +451,7 @@ structseq_replace(PyStructSequence *self, PyObject *args, PyObject *kwargs)
449
451
}
450
452
451
453
static PyMethodDef structseq_methods [] = {
452
- {"__reduce__" , ( PyCFunction ) structseq_reduce , METH_NOARGS , NULL },
454
+ {"__reduce__" , structseq_reduce , METH_NOARGS , NULL },
453
455
{"__replace__" , _PyCFunction_CAST (structseq_replace ), METH_VARARGS | METH_KEYWORDS ,
454
456
PyDoc_STR ("__replace__($self, /, **changes)\n--\n\n"
455
457
"Return a copy of the structure with new values for the specified fields." )},
0 commit comments