Skip to content

gh-111178: Make slot functions in typeobject.c have compatible types #112752

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Dec 20, 2023
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