diff options
author | Victor Stinner <vstinner@python.org> | 2019-11-22 11:27:50 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-22 11:27:50 (GMT) |
commit | 3d4833488a173c16446c3f94f58f05e2d13c5dee (patch) | |
tree | 37e5ab1eef1a29ed5aaf588a5d883107974ef9e1 /Python | |
parent | 310e2d25170a88ef03f6fd31efcc899fe062da2c (diff) | |
download | cpython-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.c | 10 |
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(); } } |