diff options
author | Charles-François Natali <neologix@free.fr> | 2011-07-23 16:15:43 (GMT) |
---|---|---|
committer | Charles-François Natali <neologix@free.fr> | 2011-07-23 16:15:43 (GMT) |
commit | f23339a7bb9d9fe977de6d90c64e3c9a27e6b00b (patch) | |
tree | cc4aae0ca41fa79ad06c80106aca91399da61bc3 | |
parent | d2d7a3b0bb99010fefd8de09da5c45b521867c23 (diff) | |
download | cpython-f23339a7bb9d9fe977de6d90c64e3c9a27e6b00b.zip cpython-f23339a7bb9d9fe977de6d90c64e3c9a27e6b00b.tar.gz cpython-f23339a7bb9d9fe977de6d90c64e3c9a27e6b00b.tar.bz2 |
Issue 12620: Make pendingbusy flag static to Py_MakePendingCalls().
-rw-r--r-- | Python/ceval.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 068da6f..1c9153e 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -491,7 +491,6 @@ static struct { } pendingcalls[NPENDINGCALLS]; static int pendingfirst = 0; static int pendinglast = 0; -static char pendingbusy = 0; int Py_AddPendingCall(int (*func)(void *), void *arg) @@ -538,6 +537,7 @@ Py_AddPendingCall(int (*func)(void *), void *arg) int Py_MakePendingCalls(void) { + static int busy = 0; int i; int r = 0; @@ -552,9 +552,9 @@ Py_MakePendingCalls(void) if (main_thread && PyThread_get_thread_ident() != main_thread) return 0; /* don't perform recursive pending calls */ - if (pendingbusy) + if (busy) return 0; - pendingbusy = 1; + busy = 1; /* perform a bounded number of calls, in case of recursion */ for (i=0; i<NPENDINGCALLS; i++) { int j; @@ -583,7 +583,7 @@ Py_MakePendingCalls(void) if (r) break; } - pendingbusy = 0; + busy = 0; return r; } |