diff options
author | Victor Stinner <vstinner@redhat.com> | 2019-06-19 22:05:23 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-19 22:05:23 (GMT) |
commit | b45d259bdda1de2b2d369458a9ad2e4d6f750687 (patch) | |
tree | 7e4b308f1729b757ebead804cde061bb06832cab /Python/pystate.c | |
parent | 35068bd059a3d9bff084ca9dcb04d51185b9ec3b (diff) | |
download | cpython-b45d259bdda1de2b2d369458a9ad2e4d6f750687.zip cpython-b45d259bdda1de2b2d369458a9ad2e4d6f750687.tar.gz cpython-b45d259bdda1de2b2d369458a9ad2e4d6f750687.tar.bz2 |
bpo-36710: Use tstate in pylifecycle.c (GH-14249)
In pylifecycle.c: pass tstate argument, rather than interp argument,
to functions.
Diffstat (limited to 'Python/pystate.c')
-rw-r--r-- | Python/pystate.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Python/pystate.c b/Python/pystate.c index 1e2b480..503b4bf 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -1143,19 +1143,18 @@ PyThreadState_IsCurrent(PyThreadState *tstate) Py_Initialize/Py_FinalizeEx */ void -_PyGILState_Init(_PyRuntimeState *runtime, - PyInterpreterState *interp, PyThreadState *tstate) +_PyGILState_Init(_PyRuntimeState *runtime, PyThreadState *tstate) { /* must init with valid states */ - assert(interp != NULL); assert(tstate != NULL); + assert(tstate->interp != NULL); struct _gilstate_runtime_state *gilstate = &runtime->gilstate; if (PyThread_tss_create(&gilstate->autoTSSkey) != 0) { Py_FatalError("Could not allocate TSS entry"); } - gilstate->autoInterpreterState = interp; + gilstate->autoInterpreterState = tstate->interp; assert(PyThread_tss_get(&gilstate->autoTSSkey) == NULL); assert(tstate->gilstate_counter == 0); |