Skip to content

Commit 0c65264

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

File tree

5 files changed

+5
-24
lines changed

5 files changed

+5
-24
lines changed

Include/internal/pycore_ceval.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ _PyEval_EvalFrame(PyThreadState *tstate, _PyInterpreterFrame *frame, int throwfl
121121
return tstate->interp->eval_frame(tstate, frame, throwflag);
122122
}
123123

124-
extern PyObject*
124+
PyAPI_FUNC(PyObject *)
125125
_PyEval_Vector(PyThreadState *tstate,
126126
PyFunctionObject *func, PyObject *locals,
127127
PyObject* const* args, size_t argcount,

Include/internal/pycore_interpframe.h

Lines changed: 2 additions & 2 deletions
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
@@ -278,7 +278,7 @@ _PyThreadState_HasStackSpace(PyThreadState *tstate, int size)
278278
size < tstate->datastack_limit - tstate->datastack_top;
279279
}
280280

281-
extern _PyInterpreterFrame *
281+
PyAPI_FUNC(_PyInterpreterFrame *)
282282
_PyThreadState_PushFrame(PyThreadState *tstate, size_t size);
283283

284284
PyAPI_FUNC(void) _PyThreadState_PopFrame(PyThreadState *tstate, _PyInterpreterFrame *frame);

Include/internal/pycore_pyerrors.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ extern "C" {
1111

1212
/* Error handling definitions */
1313

14-
extern _PyErr_StackItem* _PyErr_GetTopmostException(PyThreadState *tstate);
14+
PyAPI_FUNC(_PyErr_StackItem*) _PyErr_GetTopmostException(PyThreadState *tstate);
1515
extern PyObject* _PyErr_GetHandledException(PyThreadState *);
1616
extern void _PyErr_SetHandledException(PyThreadState *, PyObject *);
1717
extern void _PyErr_GetExcInfo(PyThreadState *, PyObject **, PyObject **, PyObject **);
@@ -108,7 +108,7 @@ extern void _PyErr_Restore(
108108
PyObject *value,
109109
PyObject *traceback);
110110

111-
extern void _PyErr_SetObject(
111+
PyAPI_FUNC(void) _PyErr_SetObject(
112112
PyThreadState *tstate,
113113
PyObject *type,
114114
PyObject *value);

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy