diff options
author | Guido van Rossum <guido@python.org> | 1997-01-21 06:15:24 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-01-21 06:15:24 (GMT) |
commit | 70d44787a366e8c72d4dc3e0537e92c47f63a75b (patch) | |
tree | 2a48f1a6922b8e005c017321eab7b8d636b8ab6f /Python/ceval.c | |
parent | fcdd0e40a45d0897ea363e590716cba6fd1834d5 (diff) | |
download | cpython-70d44787a366e8c72d4dc3e0537e92c47f63a75b.zip cpython-70d44787a366e8c72d4dc3e0537e92c47f63a75b.tar.gz cpython-70d44787a366e8c72d4dc3e0537e92c47f63a75b.tar.bz2 |
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 ;-).
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index accb56e..651066c 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -92,7 +92,6 @@ static object *apply_subscript PROTO((object *, object *)); 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 @@ eval_code2(co, globals, locals, 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 @@ eval_code2(co, globals, locals, 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) { |