[Python-checkins] cpython: Issue 12620: Make pendingbusy flag static to Py_MakePendingCalls().
charles-francois.natali
python-checkins at python.org
Sat Jul 23 18:15:57 CEST 2011
http://hg.python.org/cpython/rev/cda93720c06d
changeset: 71481:cda93720c06d
parent: 71477:e3a773fefddf
user: Charles-François Natali <neologix at free.fr>
date: Sat Jul 23 18:15:43 2011 +0200
summary:
Issue 12620: Make pendingbusy flag static to Py_MakePendingCalls().
files:
Python/ceval.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Python/ceval.c b/Python/ceval.c
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -491,7 +491,6 @@
} 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 @@
int
Py_MakePendingCalls(void)
{
+ static int busy = 0;
int i;
int r = 0;
@@ -552,9 +552,9 @@
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 @@
if (r)
break;
}
- pendingbusy = 0;
+ busy = 0;
return r;
}
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list