summaryrefslogtreecommitdiff
path: root/Python/pystate.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-04-24 18:23:53 +0200
committerGitHub <noreply@github.com>2019-04-24 18:23:53 +0200
commit43125224d6da5febb34101ebfd36536d791d68cd (patch)
treebbfc1e3bd576c09b48b1b8787998a1eeb472697a /Python/pystate.c
parent8e91c246e468515b877690e090c73f496552541d (diff)
downloadcpython-git-43125224d6da5febb34101ebfd36536d791d68cd.tar.gz
bpo-36710: Add runtime variable to Py_InitializeEx() (GH-12939)
Py_InitializeEx() now uses a runtime variable passed to subfunctions, rather than working directly on the global variable _PyRuntime. Add 'runtime' parameter to _PyCoreConfig_Write(), _PySys_Create(), _PySys_InitMain(), _PyGILState_Init(), emit_stderr_warning_for_legacy_locale() and other subfunctions.
Diffstat (limited to 'Python/pystate.c')
-rw-r--r--Python/pystate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/pystate.c b/Python/pystate.c
index 498a9546e1..a413f9d7ab 100644
--- a/Python/pystate.c
+++ b/Python/pystate.c
@@ -1052,13 +1052,13 @@ PyThreadState_IsCurrent(PyThreadState *tstate)
Py_Initialize/Py_FinalizeEx
*/
void
-_PyGILState_Init(PyInterpreterState *interp, PyThreadState *tstate)
+_PyGILState_Init(_PyRuntimeState *runtime,
+ PyInterpreterState *interp, PyThreadState *tstate)
{
/* must init with valid states */
assert(interp != NULL);
assert(tstate != NULL);
- _PyRuntimeState *runtime = &_PyRuntime;
struct _gilstate_runtime_state *gilstate = &runtime->gilstate;
if (PyThread_tss_create(&gilstate->autoTSSkey) != 0) {