summaryrefslogtreecommitdiff
path: root/Python/pystate.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/pystate.c')
-rw-r--r--Python/pystate.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/Python/pystate.c b/Python/pystate.c
index 1e2b480458..503b4bf854 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);