[Python-checkins] r67096 - sandbox/trunk/io-c/io.c

amaury.forgeotdarc python-checkins at python.org
Tue Nov 4 21:24:54 CET 2008


Author: amaury.forgeotdarc
Date: Tue Nov 4 21:24:41 2008
New Revision: 67096
Log:
Two small corrections, and almost all tests pass in test_io.
Modified:
 sandbox/trunk/io-c/io.c
Modified: sandbox/trunk/io-c/io.c
==============================================================================
--- sandbox/trunk/io-c/io.c	(original)
+++ sandbox/trunk/io-c/io.c	Tue Nov 4 21:24:41 2008
@@ -313,6 +313,7 @@
 break;
 case 'U':
 universal = 1;
+ reading = 1;
 break;
 default:
 goto invalid_mode;
@@ -1874,7 +1875,7 @@
 Py_DECREF(res);
 
 have = Py_SIZE(self->read_buf) - self->read_pos;
- if (n < have)
+ if (n > have)
 n = have;
 
 res = _BufferedReader_read_unlocked(self, n);


More information about the Python-checkins mailing list

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