aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/pylifecycle.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/pylifecycle.c')
-rw-r--r--Python/pylifecycle.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index ba248d208e4..b8a11523690 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -1663,8 +1663,10 @@ flush_std_files(void)
static void
finalize_interp_types(PyInterpreterState *interp)
{
+ _PyIO_FiniTypes(interp);
+
_PyUnicode_FiniTypes(interp);
- _PySys_Fini(interp);
+ _PySys_FiniTypes(interp);
_PyExc_Fini(interp);
_PyAsyncGen_Fini(interp);
_PyContext_Fini(interp);
@@ -1706,8 +1708,6 @@ finalize_interp_clear(PyThreadState *tstate)
/* Clear interpreter state and all thread states */
_PyInterpreterState_Clear(tstate);
- _PyIO_FiniTypes(tstate->interp);
-
/* Clear all loghooks */
/* Both _PySys_Audit function and users still need PyObject, such as tuple.
Call _PySys_ClearAuditHooks when PyObject available. */