Skip to content

Commit 05aba4e

Browse files
authored
gh-111178: Fix function signatures in instruction_sequence.c (#130591)
1 parent d5d4cbb commit 05aba4e

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

Python/instruction_sequence.c

+9-6
Original file line numberDiff line numberDiff line change
@@ -388,8 +388,9 @@ static PyGetSetDef inst_seq_getsetters[] = {
388388
};
389389

390390
static void
391-
inst_seq_dealloc(_PyInstructionSequence *seq)
391+
inst_seq_dealloc(PyObject *op)
392392
{
393+
_PyInstructionSequence *seq = (_PyInstructionSequence *)op;
393394
PyObject_GC_UnTrack(seq);
394395
Py_TRASHCAN_BEGIN(seq, inst_seq_dealloc)
395396
PyInstructionSequence_Fini(seq);
@@ -398,15 +399,17 @@ inst_seq_dealloc(_PyInstructionSequence *seq)
398399
}
399400

400401
static int
401-
inst_seq_traverse(_PyInstructionSequence *seq, visitproc visit, void *arg)
402+
inst_seq_traverse(PyObject *op, visitproc visit, void *arg)
402403
{
404+
_PyInstructionSequence *seq = (_PyInstructionSequence *)op;
403405
Py_VISIT(seq->s_nested);
404406
return 0;
405407
}
406408

407409
static int
408-
inst_seq_clear(_PyInstructionSequence *seq)
410+
inst_seq_clear(PyObject *op)
409411
{
412+
_PyInstructionSequence *seq = (_PyInstructionSequence *)op;
410413
Py_CLEAR(seq->s_nested);
411414
return 0;
412415
}
@@ -416,7 +419,7 @@ PyTypeObject _PyInstructionSequence_Type = {
416419
"InstructionSequence",
417420
sizeof(_PyInstructionSequence),
418421
0,
419-
(destructor)inst_seq_dealloc, /*tp_dealloc*/
422+
inst_seq_dealloc, /*tp_dealloc*/
420423
0, /*tp_vectorcall_offset*/
421424
0, /*tp_getattr*/
422425
0, /*tp_setattr*/
@@ -433,8 +436,8 @@ PyTypeObject _PyInstructionSequence_Type = {
433436
0, /* tp_as_buffer */
434437
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,/* tp_flags */
435438
inst_seq_new__doc__, /* tp_doc */
436-
(traverseproc)inst_seq_traverse, /* tp_traverse */
437-
(inquiry)inst_seq_clear, /* tp_clear */
439+
inst_seq_traverse, /* tp_traverse */
440+
inst_seq_clear, /* tp_clear */
438441
0, /* tp_richcompare */
439442
0, /* tp_weaklistoffset */
440443
0, /* tp_iter */

0 commit comments

Comments
 (0)