mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-40521: Make empty Unicode string per interpreter (GH-21096)
Each interpreter now has its own empty Unicode string singleton.
This commit is contained in:
parent
d051801052
commit
f363d0a6e9
12 changed files with 130 additions and 90 deletions
|
@ -595,11 +595,9 @@ pycore_init_types(PyThreadState *tstate)
|
|||
return _PyStatus_ERR("can't init longs");
|
||||
}
|
||||
|
||||
if (is_main_interp) {
|
||||
status = _PyUnicode_Init();
|
||||
if (_PyStatus_EXCEPTION(status)) {
|
||||
return status;
|
||||
}
|
||||
status = _PyUnicode_Init(tstate);
|
||||
if (_PyStatus_EXCEPTION(status)) {
|
||||
return status;
|
||||
}
|
||||
|
||||
status = _PyExc_Init(tstate);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue