bpo-40521: Make bytes singletons per interpreter (GH-21074)

Each interpreter now has its own empty bytes string and single byte
character singletons.

Replace STRINGLIB_EMPTY macro with STRINGLIB_GET_EMPTY() macro.
This commit is contained in:
Victor Stinner 2020-06-23 15:54:35 +02:00 committed by GitHub
parent 32f2eda859
commit c41eed1a87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 96 additions and 53 deletions

View file

@ -1262,9 +1262,7 @@ finalize_interp_types(PyThreadState *tstate, int is_main_interp)
_PySlice_Fini(tstate);
if (is_main_interp) {
_PyBytes_Fini();
}
_PyBytes_Fini(tstate);
_PyUnicode_Fini(tstate);
_PyFloat_Fini(tstate);
_PyLong_Fini(tstate);