[Python-3000-checkins] r66702 - python/branches/py3k/Modules/_stringio.c

amaury.forgeotdarc python-3000-checkins at python.org
Tue Sep 30 22:22:45 CEST 2008


Author: amaury.forgeotdarc
Date: Tue Sep 30 22:22:44 2008
New Revision: 66702

Log:
Fix a probable merge glitch in r66695:
a redundant check that actually belongs to another function.


Modified:
   python/branches/py3k/Modules/_stringio.c

Modified: python/branches/py3k/Modules/_stringio.c
==============================================================================
--- python/branches/py3k/Modules/_stringio.c	(original)
+++ python/branches/py3k/Modules/_stringio.c	Tue Sep 30 22:22:44 2008
@@ -140,6 +140,8 @@
 
     if (PyLong_Check(arg)) {
         size = PyLong_AsSsize_t(arg);
+        if (size == -1 && PyErr_Occurred())
+            return NULL;
     }
     else if (arg == Py_None) {
         /* Read until EOF is reached, by default. */
@@ -179,8 +181,6 @@
         size = PyLong_AsSsize_t(arg);
         if (size == -1 && PyErr_Occurred())
             return NULL;
-        if (size == -1 && PyErr_Occurred())
-            return NULL;
     }
     else if (arg == Py_None) {
         /* Truncate to current position if no argument is passed. */


More information about the Python-3000-checkins mailing list