summaryrefslogtreecommitdiffstats
path: root/Python/pylifecycle.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/pylifecycle.c')
-rw-r--r--Python/pylifecycle.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index a9a6589..4d7873f 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -941,7 +941,8 @@ pyinit_main(_PyRuntimeState *runtime, PyInterpreterState *interp)
return status;
}
- status = _PyUnicode_InitEncodings(interp);
+ PyThreadState *tstate = _PyRuntimeState_GetThreadState(runtime);
+ status = _PyUnicode_InitEncodings(tstate);
if (_PyStatus_EXCEPTION(status)) {
return status;
}
@@ -1508,7 +1509,7 @@ new_interpreter(PyThreadState **tstate_p)
return status;
}
- status = _PyUnicode_InitEncodings(interp);
+ status = _PyUnicode_InitEncodings(tstate);
if (_PyStatus_EXCEPTION(status)) {
return status;
}