diff options
author | Victor Stinner <vstinner@redhat.com> | 2019-04-24 16:23:53 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-24 16:23:53 (GMT) |
commit | 43125224d6da5febb34101ebfd36536d791d68cd (patch) | |
tree | bbfc1e3bd576c09b48b1b8787998a1eeb472697a /Python/pystate.c | |
parent | 8e91c246e468515b877690e090c73f496552541d (diff) | |
download | cpython-43125224d6da5febb34101ebfd36536d791d68cd.zip cpython-43125224d6da5febb34101ebfd36536d791d68cd.tar.gz cpython-43125224d6da5febb34101ebfd36536d791d68cd.tar.bz2 |
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/pystate.c b/Python/pystate.c index 498a954..a413f9d 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) { |