We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent df720a5 commit 767c894Copy full SHA for 767c894
1 file changed
Python/pystate.c
@@ -3487,7 +3487,7 @@ PyInterpreterView_FromMain(void)
3487
3488
static const PyThreadStateToken *_no_tstate_sentinel = (const PyThreadStateToken *)&_no_tstate_sentinel;
3489
3490
-#define NO_TSTATE_SENTINEL (_no_tstate_sentinel)
+#define NO_TSTATE_SENTINEL ((PyThreadStateToken *)_no_tstate_sentinel)
3491
3492
PyThreadStateToken *
3493
PyThreadState_Ensure(PyInterpreterGuard *guard)
@@ -3521,10 +3521,9 @@ PyThreadState_Ensure(PyInterpreterGuard *guard)
3521
3522
if (attached_tstate != NULL) {
3523
return (PyThreadStateToken*)PyThreadState_Swap(fresh_tstate);
3524
- } else {
3525
- _PyThreadState_Attach(fresh_tstate);
3526
}
3527
+ _PyThreadState_Attach(fresh_tstate);
3528
return NO_TSTATE_SENTINEL;
3529
3530
0 commit comments