Revert: bpo-33608: Factor out a private, per-interpreter _Py_AddPendingCall(). (GH-11617) (GH-12159)
* Revert "bpo-36097: Use only public C-API in the_xxsubinterpreters module (adding as necessary). (#12003)"
This reverts commit bcfa450f210074e16feb761ae5b3e966a2532fcf.
* Revert "bpo-33608: Simplify ceval's DISPATCH by hoisting eval_breaker ahead of time. (gh-12062)"
This reverts commit bda918bf65a88560ec453aaba0758a9c0d49b449.
* Revert "bpo-33608: Use _Py_AddPendingCall() in _PyCrossInterpreterData_Release(). (gh-12024)"
This reverts commit b05b711a2cef6c6c381e01069dedac372e0b9fb2.
* Revert "bpo-33608: Factor out a private, per-interpreter _Py_AddPendingCall(). (GH-11617)"
This reverts commit ef4ac967e2f3a9a18330cc6abe14adb4bc3d0465.
diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c
index ac3b6c7..f29720b 100644
--- a/Modules/signalmodule.c
+++ b/Modules/signalmodule.c
@@ -19,7 +19,6 @@
#include <process.h>
#endif
#endif
-#include "internal/pycore_pystate.h"
#ifdef HAVE_SIGNAL_H
#include <signal.h>
@@ -296,10 +295,8 @@
{
/* Py_AddPendingCall() isn't signal-safe, but we
still use it for this exceptional case. */
- _Py_AddPendingCall(_PyRuntime.interpreters.main,
- main_thread,
- report_wakeup_send_error,
- (void *)(intptr_t) last_error);
+ Py_AddPendingCall(report_wakeup_send_error,
+ (void *)(intptr_t) last_error);
}
}
}
@@ -316,10 +313,8 @@
{
/* Py_AddPendingCall() isn't signal-safe, but we
still use it for this exceptional case. */
- _Py_AddPendingCall(_PyRuntime.interpreters.main,
- main_thread,
- report_wakeup_write_error,
- (void *)(intptr_t)errno);
+ Py_AddPendingCall(report_wakeup_write_error,
+ (void *)(intptr_t)errno);
}
}
}