bpo-40521: Make slice cache per-interpreter (GH-20637)

Each interpreter now has its own slice cache:

* Move slice cache into PyInterpreterState.
* Add tstate parameter to _PySlice_Fini().
This commit is contained in:
Victor Stinner 2020-06-05 01:14:40 +02:00 committed by GitHub
parent 2ba59370c3
commit 7daba6f221
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 18 deletions

View file

@ -1265,9 +1265,9 @@ finalize_interp_types(PyThreadState *tstate, int is_main_interp)
if (is_main_interp) {
_PyDict_Fini();
_PySlice_Fini();
}
_PySlice_Fini(tstate);
_PyWarnings_Fini(tstate->interp);
if (is_main_interp) {