diff options
author | Victor Stinner <vstinner@python.org> | 2025-02-26 21:36:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-26 21:36:26 +0100 |
commit | 05aba4e799d20232760da781d64a7e678bb28320 (patch) | |
tree | 53801f212a99e405bf97f44da59000276455e8be /Python | |
parent | d5d4cbbd8f20921646a90bec27535c2f9a3e83b2 (diff) | |
download | cpython-05aba4e799d20232760da781d64a7e678bb28320.tar.gz cpython-05aba4e799d20232760da781d64a7e678bb28320.zip |
gh-111178: Fix function signatures in instruction_sequence.c (#130591)
Diffstat (limited to 'Python')
-rw-r--r-- | Python/instruction_sequence.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/Python/instruction_sequence.c b/Python/instruction_sequence.c index a3f85f754d7..e2607e98095 100644 --- a/Python/instruction_sequence.c +++ b/Python/instruction_sequence.c @@ -388,8 +388,9 @@ static PyGetSetDef inst_seq_getsetters[] = { }; static void -inst_seq_dealloc(_PyInstructionSequence *seq) +inst_seq_dealloc(PyObject *op) { + _PyInstructionSequence *seq = (_PyInstructionSequence *)op; PyObject_GC_UnTrack(seq); Py_TRASHCAN_BEGIN(seq, inst_seq_dealloc) PyInstructionSequence_Fini(seq); @@ -398,15 +399,17 @@ inst_seq_dealloc(_PyInstructionSequence *seq) } static int -inst_seq_traverse(_PyInstructionSequence *seq, visitproc visit, void *arg) +inst_seq_traverse(PyObject *op, visitproc visit, void *arg) { + _PyInstructionSequence *seq = (_PyInstructionSequence *)op; Py_VISIT(seq->s_nested); return 0; } static int -inst_seq_clear(_PyInstructionSequence *seq) +inst_seq_clear(PyObject *op) { + _PyInstructionSequence *seq = (_PyInstructionSequence *)op; Py_CLEAR(seq->s_nested); return 0; } @@ -416,7 +419,7 @@ PyTypeObject _PyInstructionSequence_Type = { "InstructionSequence", sizeof(_PyInstructionSequence), 0, - (destructor)inst_seq_dealloc, /*tp_dealloc*/ + inst_seq_dealloc, /*tp_dealloc*/ 0, /*tp_vectorcall_offset*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -433,8 +436,8 @@ PyTypeObject _PyInstructionSequence_Type = { 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,/* tp_flags */ inst_seq_new__doc__, /* tp_doc */ - (traverseproc)inst_seq_traverse, /* tp_traverse */ - (inquiry)inst_seq_clear, /* tp_clear */ + inst_seq_traverse, /* tp_traverse */ + inst_seq_clear, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ 0, /* tp_iter */ |