mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
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.
This commit is contained in:
parent
ea38e436fe
commit
595225e86d
4 changed files with 144 additions and 85 deletions
|
@ -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 *);
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue