summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2022-01-22 21:55:39 (GMT)
committerGitHub <noreply@github.com>2022-01-22 21:55:39 (GMT)
commit1626bf4ac7aef1244e6f886e63a31f7ed65fbd10 (patch)
tree21e80b2b17eaff62c94f0cecd764e7f7ddba6265 /Python
parent621a45ccacd121f9ae4d8a539f040410c74b253b (diff)
downloadcpython-1626bf4ac7aef1244e6f886e63a31f7ed65fbd10.zip
cpython-1626bf4ac7aef1244e6f886e63a31f7ed65fbd10.tar.gz
cpython-1626bf4ac7aef1244e6f886e63a31f7ed65fbd10.tar.bz2
bpo-46417: Clear Unicode static types at exit (GH-30806)
Add _PyUnicode_FiniTypes() function, called by finalize_interp_types(). It clears these static types: * EncodingMapType * PyFieldNameIter_Type * PyFormatterIter_Type _PyStaticType_Dealloc() now does nothing if tp_subclasses is not NULL.
Diffstat (limited to 'Python')
-rw-r--r--Python/pylifecycle.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index aca3b1a..7fc9d3c 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -1664,6 +1664,7 @@ flush_std_files(void)
static void
finalize_interp_types(PyInterpreterState *interp)
{
+ _PyUnicode_FiniTypes(interp);
_PySys_Fini(interp);
_PyExc_Fini(interp);
_PyFrame_Fini(interp);