gh-131776: Expose functions called from the interpreter loop via PyAPI_FUNC (#134242)

This commit is contained in:
Dino Viehland 2025-09-17 16:04:02 +01:00 committed by GitHub
parent dd15a2e11e
commit 299de38e61
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 54 additions and 32 deletions

View file

@ -752,6 +752,22 @@ lookup_tp_subclasses(PyTypeObject *self)
return (PyObject *)self->tp_subclasses;
}
PyObject *
_PyType_LookupSubclasses(PyTypeObject *self)
{
return lookup_tp_subclasses(self);
}
PyObject *
_PyType_InitSubclasses(PyTypeObject *self)
{
PyObject *existing = lookup_tp_subclasses(self);
if (existing != NULL) {
return existing;
}
return init_tp_subclasses(self);
}
int
_PyType_HasSubclasses(PyTypeObject *self)
{