File tree Expand file tree Collapse file tree 1 file changed +17
-27
lines changed
Expand file tree Collapse file tree 1 file changed +17
-27
lines changed Original file line number Diff line number Diff line change @@ -1250,37 +1250,26 @@ static void
12501250finalize_interp_types (PyThreadState * tstate , int is_main_interp )
12511251{
12521252 _PyFrame_Fini (tstate );
1253- _PyTuple_Fini (tstate );
1254- _PyList_Fini (tstate );
1253+ _PyAsyncGen_Fini (tstate );
1254+ _PyContext_Fini (tstate );
1255+
12551256 if (is_main_interp ) {
12561257 _PySet_Fini ();
1257- _PyBytes_Fini ();
12581258 }
1259-
1260- _PyLong_Fini (tstate );
1261- _PyFloat_Fini (tstate );
1262-
12631259 if (is_main_interp ) {
12641260 _PyDict_Fini ();
12651261 }
1262+ _PyList_Fini (tstate );
1263+ _PyTuple_Fini (tstate );
12661264
12671265 _PySlice_Fini (tstate );
1268- _PyWarnings_Fini (tstate -> interp );
12691266
12701267 if (is_main_interp ) {
1271- _Py_HashRandomization_Fini ();
1272- _PyArg_Fini ();
1268+ _PyBytes_Fini ();
12731269 }
1274-
1275- _PyAsyncGen_Fini (tstate );
1276- _PyContext_Fini (tstate );
1277-
1278- /* Cleanup Unicode implementation */
12791270 _PyUnicode_Fini (tstate );
1280-
1281- if (is_main_interp ) {
1282- _Py_ClearFileSystemEncoding ();
1283- }
1271+ _PyFloat_Fini (tstate );
1272+ _PyLong_Fini (tstate );
12841273}
12851274
12861275
@@ -1299,19 +1288,20 @@ finalize_interp_clear(PyThreadState *tstate)
12991288
13001289 _PyGC_Fini (tstate );
13011290
1302- finalize_interp_types (tstate , is_main_interp );
1303-
13041291 if (is_main_interp ) {
1305- /* XXX Still allocated:
1306- - various static ad-hoc pointers to interned strings
1307- - int and float free list blocks
1308- - whatever various modules and libraries allocate
1309- */
1292+ _Py_HashRandomization_Fini ();
1293+ _PyArg_Fini ();
1294+ _Py_ClearFileSystemEncoding ();
1295+ }
13101296
1311- PyGrammar_RemoveAccelerators ( & _PyParser_Grammar );
1297+ _PyWarnings_Fini ( tstate -> interp );
13121298
1299+ if (is_main_interp ) {
1300+ PyGrammar_RemoveAccelerators (& _PyParser_Grammar );
13131301 _PyExc_Fini ();
13141302 }
1303+
1304+ finalize_interp_types (tstate , is_main_interp );
13151305}
13161306
13171307
You can’t perform that action at this time.
0 commit comments