Skip to content

Commit c71668f

Browse files
committed
Drop exposing of subclasses
1 parent 0e77fd1 commit c71668f

File tree

3 files changed

+1
-20
lines changed

3 files changed

+1
-20
lines changed

Include/internal/pycore_interpframe.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ _PyFrame_ClearLocals(_PyInterpreterFrame *frame);
254254
* take should be set to 1 for heap allocated
255255
* frames like the ones in generators and coroutines.
256256
*/
257-
void
257+
PyAPI_FUNC(void)
258258
_PyFrame_ClearExceptCode(_PyInterpreterFrame * frame);
259259

260260
int

Include/internal/pycore_typeobject.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,6 @@ _PyType_GetModuleState(PyTypeObject *type)
8989
// function
9090
PyAPI_FUNC(PyObject *) _PyType_GetDict(PyTypeObject *);
9191

92-
PyAPI_FUNC(PyObject *) _PyType_LookupSubclasses(PyTypeObject *);
93-
PyAPI_FUNC(PyObject *) _PyType_InitSubclasses(PyTypeObject *);
94-
9592
extern PyObject * _PyType_GetBases(PyTypeObject *type);
9693
extern PyObject * _PyType_GetMRO(PyTypeObject *type);
9794
extern PyObject* _PyType_GetSubclasses(PyTypeObject *);

Objects/typeobject.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -753,22 +753,6 @@ lookup_tp_subclasses(PyTypeObject *self)
753753
return (PyObject *)self->tp_subclasses;
754754
}
755755

756-
PyObject *
757-
_PyType_LookupSubclasses(PyTypeObject *self)
758-
{
759-
return lookup_tp_subclasses(self);
760-
}
761-
762-
PyObject *
763-
_PyType_InitSubclasses(PyTypeObject *self)
764-
{
765-
PyObject *existing = lookup_tp_subclasses(self);
766-
if (existing != NULL) {
767-
return existing;
768-
}
769-
return init_tp_subclasses(self);
770-
}
771-
772756
int
773757
_PyType_HasSubclasses(PyTypeObject *self)
774758
{

0 commit comments

Comments
 (0)