[Python-checkins] CVS: python/dist/src/Modules timemodule.c,2.80,2.81

Andrew M. Kuchling python-dev@python.org
2000年3月24日 15:35:23 -0500 (EST)


Update of /projects/cvsroot/python/dist/src/Modules
In directory amarok:/home/akuchlin/src/Python-1.5/Modules
Modified Files:
	timemodule.c 
Log Message:
Fix probable bug; if errno == EINTR, floatsleep() doesn't break out of 
 a Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS block, but it 
 calls Py_BLOCK_THREADS anyway. The change moves Py_BLOCK_THREADS 
 to inside the if, so it's only executed when the function
 actually returns unexpectedly.
Index: timemodule.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/timemodule.c,v
retrieving revision 2.80
retrieving revision 2.81
diff -C2 -r2.80 -r2.81
*** timemodule.c	2000年03月14日 21:17:16	2.80
--- timemodule.c	2000年03月24日 20:35:20	2.81
***************
*** 756,760 ****
 	Py_BEGIN_ALLOW_THREADS
 	if (select(0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &t) != 0) {
- 		Py_BLOCK_THREADS
 #ifdef EINTR
 		if (errno != EINTR) {
--- 756,759 ----
***************
*** 762,765 ****
--- 761,765 ----
 		if (1) {
 #endif
+ 			Py_BLOCK_THREADS
 			PyErr_SetFromErrno(PyExc_IOError);
 			return -1;

AltStyle によって変換されたページ (->オリジナル) /