2121#include <process.h>
2222#endif
2323#endif
24- #include "internal/pycore_pystate.h"
2524
2625#ifdef HAVE_SIGNAL_H
2726#include <signal.h>
@@ -260,7 +259,6 @@ trip_signal(int sig_num)
260259 /* Notify ceval.c */
261260 _PyRuntimeState * runtime = & _PyRuntime ;
262261 PyThreadState * tstate = _PyRuntimeState_GetThreadState (runtime );
263- PyInterpreterState * interp = runtime -> interpreters .main ;
264262 _PyEval_SignalReceived (& runtime -> ceval );
265263
266264 /* And then write to the wakeup fd *after* setting all the globals and
@@ -301,10 +299,7 @@ trip_signal(int sig_num)
301299 {
302300 /* Py_AddPendingCall() isn't signal-safe, but we
303301 still use it for this exceptional case. */
304- _PyEval_AddPendingCall (tstate ,
305- & runtime -> ceval ,
306- & interp -> ceval ,
307- runtime -> main_thread ,
302+ _PyEval_AddPendingCall (tstate , & runtime -> ceval ,
308303 report_wakeup_send_error ,
309304 (void * )(intptr_t ) last_error );
310305 }
@@ -323,10 +318,7 @@ trip_signal(int sig_num)
323318 {
324319 /* Py_AddPendingCall() isn't signal-safe, but we
325320 still use it for this exceptional case. */
326- _PyEval_AddPendingCall (tstate ,
327- & runtime -> ceval ,
328- & interp -> ceval ,
329- runtime -> main_thread ,
321+ _PyEval_AddPendingCall (tstate , & runtime -> ceval ,
330322 report_wakeup_write_error ,
331323 (void * )(intptr_t )errno );
332324 }
0 commit comments