mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
gh-131776: Expose functions called from the interpreter loop via PyAPI_FUNC (#134242)
This commit is contained in:
parent
dd15a2e11e
commit
299de38e61
9 changed files with 54 additions and 32 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue