Skip to content
Prev Previous commit
Next Next commit
Make type_is_gc() compatible with inquiry
  • Loading branch information
chrstphrchvz authored Dec 5, 2023
commit c3f7da2723a242512ec402aaf8f43bb7d27e98d5
6 changes: 3 additions & 3 deletions Objects/typeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -5342,9 +5342,9 @@ type_clear(PyObject *self)
}

static int
type_is_gc(PyTypeObject *type)
type_is_gc(PyObject *type)
{
return type->tp_flags & Py_TPFLAGS_HEAPTYPE;
return ((PyTypeObject *)type)->tp_flags & Py_TPFLAGS_HEAPTYPE;
}


Expand Down Expand Up @@ -5395,7 +5395,7 @@ PyTypeObject PyType_Type = {
0, /* tp_alloc */
type_new, /* tp_new */
PyObject_GC_Del, /* tp_free */
(inquiry)type_is_gc, /* tp_is_gc */
type_is_gc, /* tp_is_gc */
.tp_vectorcall = type_vectorcall,
};

Expand Down