File tree 1 file changed +17
-27
lines changed
1 file changed +17
-27
lines changed Original file line number Diff line number Diff line change @@ -1250,37 +1250,26 @@ static void
1250
1250
finalize_interp_types (PyThreadState * tstate , int is_main_interp )
1251
1251
{
1252
1252
_PyFrame_Fini (tstate );
1253
- _PyTuple_Fini (tstate );
1254
- _PyList_Fini (tstate );
1253
+ _PyAsyncGen_Fini (tstate );
1254
+ _PyContext_Fini (tstate );
1255
+
1255
1256
if (is_main_interp ) {
1256
1257
_PySet_Fini ();
1257
- _PyBytes_Fini ();
1258
1258
}
1259
-
1260
- _PyLong_Fini (tstate );
1261
- _PyFloat_Fini (tstate );
1262
-
1263
1259
if (is_main_interp ) {
1264
1260
_PyDict_Fini ();
1265
1261
}
1262
+ _PyList_Fini (tstate );
1263
+ _PyTuple_Fini (tstate );
1266
1264
1267
1265
_PySlice_Fini (tstate );
1268
- _PyWarnings_Fini (tstate -> interp );
1269
1266
1270
1267
if (is_main_interp ) {
1271
- _Py_HashRandomization_Fini ();
1272
- _PyArg_Fini ();
1268
+ _PyBytes_Fini ();
1273
1269
}
1274
-
1275
- _PyAsyncGen_Fini (tstate );
1276
- _PyContext_Fini (tstate );
1277
-
1278
- /* Cleanup Unicode implementation */
1279
1270
_PyUnicode_Fini (tstate );
1280
-
1281
- if (is_main_interp ) {
1282
- _Py_ClearFileSystemEncoding ();
1283
- }
1271
+ _PyFloat_Fini (tstate );
1272
+ _PyLong_Fini (tstate );
1284
1273
}
1285
1274
1286
1275
@@ -1299,19 +1288,20 @@ finalize_interp_clear(PyThreadState *tstate)
1299
1288
1300
1289
_PyGC_Fini (tstate );
1301
1290
1302
- finalize_interp_types (tstate , is_main_interp );
1303
-
1304
1291
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
+ }
1310
1296
1311
- PyGrammar_RemoveAccelerators ( & _PyParser_Grammar );
1297
+ _PyWarnings_Fini ( tstate -> interp );
1312
1298
1299
+ if (is_main_interp ) {
1300
+ PyGrammar_RemoveAccelerators (& _PyParser_Grammar );
1313
1301
_PyExc_Fini ();
1314
1302
}
1303
+
1304
+ finalize_interp_types (tstate , is_main_interp );
1315
1305
}
1316
1306
1317
1307
You can’t perform that action at this time.
0 commit comments