[Python-checkins] CVS: python/dist/src/Modules socketmodule.c,1.210,1.211

Jack Jansen jackjansen@users.sourceforge.net
Mon, 25 Mar 2002 07:32:03 -0800


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

Modified Files:
	socketmodule.c 
Log Message:
Due to interaction between the MSL C library and the GUSI I/O library I can get reads from sockets to work consistently either for unbuffered binary files or for buffered binary files, but not for both:-(

The workaround is to force socket.makefile() to disable buffering for binary files.

Fixes bug 534625. 2.2.1 candidate.

Index: socketmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v
retrieving revision 1.210
retrieving revision 1.211
diff -C2 -d -r1.210 -r1.211
*** socketmodule.c	3 Mar 2002 03:03:52 -0000	1.210
--- socketmodule.c	25 Mar 2002 15:32:01 -0000	1.211
***************
*** 1366,1369 ****
--- 1366,1374 ----
  		return s->errorhandler();
  	}
+ #ifdef USE_GUSI2
+ 	/* Workaround for bug in Metrowerks MSL vs. GUSI I/O library */
+ 	if (strchr(mode, 'b') != NULL )
+ 		bufsize = 0;
+ #endif
  	f = PyFile_FromFile(fp, "<socket>", mode, fclose);
  	if (f != NULL)