File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -2659,7 +2659,6 @@ _PyXI_Enter(_PyXI_session *session,
2659
2659
_enter_session (session , interp );
2660
2660
_PyXI_failure override = XI_FAILURE_INIT ;
2661
2661
override .code = _PyXI_ERR_UNCAUGHT_EXCEPTION ;
2662
- tstate = _PyThreadState_GET ();
2663
2662
2664
2663
// Ensure this thread owns __main__.
2665
2664
if (_PyInterpreterState_SetRunningMain (interp ) < 0 ) {
@@ -2684,7 +2683,7 @@ _PyXI_Enter(_PyXI_session *session,
2684
2683
}
2685
2684
2686
2685
override .code = _PyXI_ERR_NO_ERROR ;
2687
- assert (!_PyErr_Occurred (tstate ));
2686
+ assert (!_PyErr_Occurred (_PyThreadState_GET () ));
2688
2687
return 0 ;
2689
2688
2690
2689
error :
@@ -2695,7 +2694,6 @@ _PyXI_Enter(_PyXI_session *session,
2695
2694
2696
2695
// Exit the session.
2697
2696
_exit_session (session );
2698
- tstate = _PyThreadState_GET ();
2699
2697
2700
2698
if (sharedns != NULL ) {
2701
2699
_destroy_sharedns (sharedns );
@@ -2715,7 +2713,7 @@ _PyXI_Enter(_PyXI_session *session,
2715
2713
Py_DECREF (excinfo );
2716
2714
}
2717
2715
}
2718
- assert (_PyErr_Occurred (tstate ));
2716
+ assert (_PyErr_Occurred (_PyThreadState_GET () ));
2719
2717
2720
2718
return -1 ;
2721
2719
}
You can’t perform that action at this time.
0 commit comments