diff options
author | Victor Stinner <vstinner@python.org> | 2022-01-21 13:06:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-21 13:06:34 +0100 |
commit | 595225e86dcc6ea520a584839925a878dce7a9b2 (patch) | |
tree | 177f9801d750c91f61ae40b99b9dcf8b0e9c135d /Include | |
parent | ea38e436fe1e585fb8c1f0badf5482f525b7f9ff (diff) | |
download | cpython3-595225e86dcc6ea520a584839925a878dce7a9b2.tar.gz |
bpo-46417: Py_Finalize() clears static types (GH-30743)
Add _PyTypes_FiniTypes() best-effort function to clear static types:
don't deallocate a type if it still has subclasses.
remove_subclass() now sets tp_subclasses to NULL when removing the
last subclass.
Diffstat (limited to 'Include')
-rw-r--r-- | Include/internal/pycore_typeobject.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Include/internal/pycore_typeobject.h b/Include/internal/pycore_typeobject.h index ba95bbc1c4..c480a3a57b 100644 --- a/Include/internal/pycore_typeobject.h +++ b/Include/internal/pycore_typeobject.h @@ -13,6 +13,7 @@ extern "C" { extern PyStatus _PyTypes_InitState(PyInterpreterState *); extern PyStatus _PyTypes_InitTypes(PyInterpreterState *); +extern void _PyTypes_FiniTypes(PyInterpreterState *); extern void _PyTypes_Fini(PyInterpreterState *); |