Skip to content

Commit 6a4eb46

Browse files
committed
Update also slice_traverse()
1 parent a5584f6 commit 6a4eb46

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Objects/sliceobject.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -620,8 +620,9 @@ slice_richcompare(PyObject *v, PyObject *w, int op)
620620
}
621621

622622
static int
623-
slice_traverse(PySliceObject *v, visitproc visit, void *arg)
623+
slice_traverse(PyObject *op, visitproc visit, void *arg)
624624
{
625+
PySliceObject *v = _PySlice_CAST(op);
625626
Py_VISIT(v->start);
626627
Py_VISIT(v->stop);
627628
Py_VISIT(v->step);
@@ -687,7 +688,7 @@ PyTypeObject PySlice_Type = {
687688
0, /* tp_as_buffer */
688689
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags */
689690
slice_doc, /* tp_doc */
690-
(traverseproc)slice_traverse, /* tp_traverse */
691+
slice_traverse, /* tp_traverse */
691692
0, /* tp_clear */
692693
slice_richcompare, /* tp_richcompare */
693694
0, /* tp_weaklistoffset */

0 commit comments

Comments
 (0)