summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2019-11-22 11:27:50 (GMT)
committerGitHub <noreply@github.com>2019-11-22 11:27:50 (GMT)
commit3d4833488a173c16446c3f94f58f05e2d13c5dee (patch)
tree37e5ab1eef1a29ed5aaf588a5d883107974ef9e1 /Python
parent310e2d25170a88ef03f6fd31efcc899fe062da2c (diff)
downloadcpython-3d4833488a173c16446c3f94f58f05e2d13c5dee.zip
cpython-3d4833488a173c16446c3f94f58f05e2d13c5dee.tar.gz
cpython-3d4833488a173c16446c3f94f58f05e2d13c5dee.tar.bz2
bpo-38858: Call _PyUnicode_Fini() in Py_EndInterpreter() (GH-17330)
Py_EndInterpreter() now clears the filesystem codec.
Diffstat (limited to 'Python')
-rw-r--r--Python/pylifecycle.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index 8c508e3..5f3c49a 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -1182,9 +1182,6 @@ finalize_interp_types(PyThreadState *tstate, int is_main_interp)
_PySet_Fini();
_PyBytes_Fini();
_PyLong_Fini();
- }
-
- if (is_main_interp) {
_PyFloat_Fini();
_PyDict_Fini();
_PySlice_Fini();
@@ -1197,9 +1194,12 @@ finalize_interp_types(PyThreadState *tstate, int is_main_interp)
_PyArg_Fini();
_PyAsyncGen_Fini();
_PyContext_Fini();
+ }
+
+ /* Cleanup Unicode implementation */
+ _PyUnicode_Fini(tstate);
- /* Cleanup Unicode implementation */
- _PyUnicode_Fini();
+ if (is_main_interp) {
_Py_ClearFileSystemEncoding();
}
}