From f363d0a6e9cfa50677a6de203735fbc0d06c2f49 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 24 Jun 2020 00:10:40 +0200 Subject: bpo-40521: Make empty Unicode string per interpreter (GH-21096) Each interpreter now has its own empty Unicode string singleton. --- Python/pylifecycle.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'Python/pylifecycle.c') diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index f0b40b3aa68..eda4c6ad7e4 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -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); -- cgit v1.2.3