diff options
author | Victor Stinner <vstinner@redhat.com> | 2019-06-03 18:14:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-03 18:14:24 +0200 |
commit | e225bebc1409bcf68db74a35ed3c31222883bf8f (patch) | |
tree | 42153d2d48a3f1c784812b4fb54ed3557be713d0 /Modules | |
parent | 49a7e347976c9b39149ac7505b11ad6e9e2bdeec (diff) | |
download | cpython-git-e225bebc1409bcf68db74a35ed3c31222883bf8f.tar.gz |
Revert "bpo-33608: Factor out a private, per-interpreter _Py_AddPendingCall(). (gh-13714)" (GH-13780)
This reverts commit 6a150bcaeb190d1731b38ab9c7a5d1a352847ddc.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_testcapimodule.c | 1 | ||||
-rw-r--r-- | Modules/signalmodule.c | 12 |
2 files changed, 2 insertions, 11 deletions
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c index 40e0826ce1..f059b4df11 100644 --- a/Modules/_testcapimodule.c +++ b/Modules/_testcapimodule.c @@ -2677,7 +2677,6 @@ pending_threadfunc(PyObject *self, PyObject *arg) Py_INCREF(callable); Py_BEGIN_ALLOW_THREADS - /* XXX Use the internal _Py_AddPendingCall(). */ r = Py_AddPendingCall(&_pending_callback, callable); Py_END_ALLOW_THREADS diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c index 1964646da2..7698984ff3 100644 --- a/Modules/signalmodule.c +++ b/Modules/signalmodule.c @@ -21,7 +21,6 @@ #include <process.h> #endif #endif -#include "internal/pycore_pystate.h" #ifdef HAVE_SIGNAL_H #include <signal.h> @@ -260,7 +259,6 @@ trip_signal(int sig_num) /* Notify ceval.c */ _PyRuntimeState *runtime = &_PyRuntime; PyThreadState *tstate = _PyRuntimeState_GetThreadState(runtime); - PyInterpreterState *interp = runtime->interpreters.main; _PyEval_SignalReceived(&runtime->ceval); /* And then write to the wakeup fd *after* setting all the globals and @@ -301,10 +299,7 @@ trip_signal(int sig_num) { /* Py_AddPendingCall() isn't signal-safe, but we still use it for this exceptional case. */ - _PyEval_AddPendingCall(tstate, - &runtime->ceval, - &interp->ceval, - runtime->main_thread, + _PyEval_AddPendingCall(tstate, &runtime->ceval, report_wakeup_send_error, (void *)(intptr_t) last_error); } @@ -323,10 +318,7 @@ trip_signal(int sig_num) { /* Py_AddPendingCall() isn't signal-safe, but we still use it for this exceptional case. */ - _PyEval_AddPendingCall(tstate, - &runtime->ceval, - &interp->ceval, - runtime->main_thread, + _PyEval_AddPendingCall(tstate, &runtime->ceval, report_wakeup_write_error, (void *)(intptr_t)errno); } |