Mercurial > cpython-lru_cache-weakref
diff Modules/socketmodule.c @ 22547:0922c919cedb legacy-trunk
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 | Jack Jansen <jack.jansen@cwi.nl> |
|---|---|
| date | Mon, 25 Mar 2002 15:32:01 +0000 |
| parents | d104bb50a194 |
| children | 6a1c8752a65f |
line wrap: on
line diff
--- a/Modules/socketmodule.c Mon Mar 25 14:20:09 2002 +0000 +++ b/Modules/socketmodule.c Mon Mar 25 15:32:01 2002 +0000 @@ -1365,6 +1365,11 @@ SOCKETCLOSE(fd); 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) PyFile_SetBufSize(f, bufsize);
