summaryrefslogtreecommitdiffstats
path: root/Modules/_io
diff options
context:
space:
mode:
authorInada Naoki <songofacandy@gmail.com>2019-03-03 16:22:39 (GMT)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-03-03 16:22:39 (GMT)
commit8c17d928eb4602201d02b475caffc63340df849e (patch)
tree687e80ed19423e0091132321808b373cffbafd36 /Modules/_io
parent45d8d2469a48589e950dad2452043188eb9399a3 (diff)
downloadcpython-8c17d928eb4602201d02b475caffc63340df849e.zip
cpython-8c17d928eb4602201d02b475caffc63340df849e.tar.gz
cpython-8c17d928eb4602201d02b475caffc63340df849e.tar.bz2
add missing break statement (GH-12147)
Bug introduced by 848037c.
Diffstat (limited to 'Modules/_io')
-rw-r--r--Modules/_io/textio.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c
index 0f0092f..8c39165 100644
--- a/Modules/_io/textio.c
+++ b/Modules/_io/textio.c
@@ -2363,6 +2363,8 @@ _io_TextIOWrapper_seek_impl(textio *self, PyObject *cookieObj, int whence)
cookieObj = _PyObject_CallMethodId((PyObject *)self, &PyId_tell, NULL);
if (cookieObj == NULL)
goto fail;
+ break;
+
case SEEK_END:
/* seek relative to end of file */
cmp = PyObject_RichCompareBool(cookieObj, _PyLong_Zero, Py_EQ);
@@ -2401,8 +2403,10 @@ _io_TextIOWrapper_seek_impl(textio *self, PyObject *cookieObj, int whence)
}
}
return res;
+
case SEEK_SET:
break;
+
default:
PyErr_Format(PyExc_ValueError,
"invalid whence (%d, should be %d, %d or %d)", whence,