Kaydet (Commit) 58fb905a authored tarafından Amaury Forgeot d'Arc's avatar Amaury Forgeot d'Arc

Fix a probable merge glitch in r66695:

a redundant check that actually belongs to another function.
üst c9e435ee
...@@ -140,6 +140,8 @@ stringio_read(StringIOObject *self, PyObject *args) ...@@ -140,6 +140,8 @@ stringio_read(StringIOObject *self, PyObject *args)
if (PyLong_Check(arg)) { if (PyLong_Check(arg)) {
size = PyLong_AsSsize_t(arg); size = PyLong_AsSsize_t(arg);
if (size == -1 && PyErr_Occurred())
return NULL;
} }
else if (arg == Py_None) { else if (arg == Py_None) {
/* Read until EOF is reached, by default. */ /* Read until EOF is reached, by default. */
...@@ -179,8 +181,6 @@ stringio_truncate(StringIOObject *self, PyObject *args) ...@@ -179,8 +181,6 @@ stringio_truncate(StringIOObject *self, PyObject *args)
size = PyLong_AsSsize_t(arg); size = PyLong_AsSsize_t(arg);
if (size == -1 && PyErr_Occurred()) if (size == -1 && PyErr_Occurred())
return NULL; return NULL;
if (size == -1 && PyErr_Occurred())
return NULL;
} }
else if (arg == Py_None) { else if (arg == Py_None) {
/* Truncate to current position if no argument is passed. */ /* Truncate to current position if no argument is passed. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment