[Python-checkins] python/dist/src/Python ceval.c,2.319,2.320

gvanrossum@users.sourceforge.net gvanrossum@users.sourceforge.net
Wed, 17 Jul 2002 09:57:17 -0700


Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv27026

Modified Files:
	ceval.c 
Log Message:
SF patch 552161 - Py_AddPendingCall doesn't unlock on fail (Daniel
Dunbar)

Can't test this, but looks correct to me.


Index: ceval.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v
retrieving revision 2.319
retrieving revision 2.320
diff -C2 -d -r2.319 -r2.320
*** ceval.c	17 Jul 2002 16:49:03 -0000	2.319
--- ceval.c	17 Jul 2002 16:57:13 -0000	2.320
***************
*** 380,385 ****
  	i = pendinglast;
  	j = (i + 1) % NPENDINGCALLS;
! 	if (j == pendingfirst)
  		return -1; /* Queue full */
  	pendingcalls[i].func = func;
  	pendingcalls[i].arg = arg;
--- 380,387 ----
  	i = pendinglast;
  	j = (i + 1) % NPENDINGCALLS;
! 	if (j == pendingfirst) {
! 		busy = 0;
  		return -1; /* Queue full */
+ 	}
  	pendingcalls[i].func = func;
  	pendingcalls[i].arg = arg;