Skip to content

Commit b84fa90

Browse files
committed
Fix the ensure counter.
1 parent 911c6b5 commit b84fa90

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Python/pystate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3291,9 +3291,9 @@ PyThreadState_Ensure(PyInterpreterRef interp_ref)
32913291
if (fresh_tstate == NULL) {
32923292
return -1;
32933293
}
3294+
fresh_tstate->ensure_counter = 1;
32943295

32953296
if (attached_tstate != NULL) {
3296-
fresh_tstate->ensure_counter = 1;
32973297
fresh_tstate->prior_ensure = PyThreadState_Swap(fresh_tstate);
32983298
} else {
32993299
_PyThreadState_Attach(fresh_tstate);

0 commit comments

Comments
 (0)