Mercurial > cpython-lru_cache-weakref
diff Modules/socketmodule.c @ 22551:8b636fcb8615 2.2
backport jackjansen's checkin of
revision 1.211 of socketmodule.c
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.
| author | Michael W. Hudson <mwh@python.net> |
|---|---|
| date | Mon, 25 Mar 2002 17:40:43 +0000 |
| parents | e223397b26fa |
| children | 37435f9f04d6 |
line wrap: on
line diff
--- a/Modules/socketmodule.c Mon Mar 25 16:37:39 2002 +0000 +++ b/Modules/socketmodule.c Mon Mar 25 17:40:43 2002 +0000 @@ -1453,6 +1453,11 @@ SOCKETCLOSE(fd); return PySocket_Err(); } +#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) PyFile_SetBufSize(f, bufsize);
