Mercurial > cpython-lru_cache-weakref
diff Python/ceval.c @ 5021:c22add364351 legacy-trunk
Only call sigcheck() at the ticker code if we don't have true signals.
This is safe now that both intrcheck() and signalmodule.c schedule a
sigcheck() call via Py_AddPendingCall().
This gives another 7% speedup (never run such a test twice ;-).
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Tue, 21 Jan 1997 06:15:24 +0000 |
| parents | 001a5042b181 |
| children | 75c1ee882a4a |
line wrap: on
line diff
--- a/Python/ceval.c Tue Jan 21 06:13:09 1997 +0000 +++ b/Python/ceval.c Tue Jan 21 06:15:24 1997 +0000 @@ -92,7 +92,6 @@ static object *loop_subscript PROTO((object *, object *)); static int slice_index PROTO((object *, int, int *)); static object *apply_slice PROTO((object *, object *, object *)); -static object *build_slice PROTO((object *, object *, object *)); static int assign_subscript PROTO((object *, object *, object *)); static int assign_slice PROTO((object *, object *, object *, object *)); static int cmp_exception PROTO((object *, object *)); @@ -557,7 +556,7 @@ So we do it only every Nth instruction. The ticker is reset to zero if there are pending - calls (see Py_AddPendingCalls() and + calls (see Py_AddPendingCall() and Py_MakePendingCalls() above). */ if (--ticker < 0) { @@ -568,10 +567,15 @@ goto on_error; } } +#ifndef HAVE_SIGNAL_H /* Is this the right #define? */ +/* If we have true signals, the signal handler will call + Py_AddPendingCall() so we don't have to call sigcheck(). + On the Mac and DOS, alas, we have to call it. */ if (sigcheck()) { why = WHY_EXCEPTION; goto on_error; } +#endif #ifdef WITH_THREAD if (interpreter_lock) {
