summaryrefslogtreecommitdiffstats
path: root/Modules/_io/bufferedio.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_io/bufferedio.c')
-rw-r--r--Modules/_io/bufferedio.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/Modules/_io/bufferedio.c b/Modules/_io/bufferedio.c
index 39c778c..fb651a7 100644
--- a/Modules/_io/bufferedio.c
+++ b/Modules/_io/bufferedio.c
@@ -720,7 +720,7 @@ buffered_read(buffered *self, PyObject *args)
PyObject *res;
CHECK_INITIALIZED(self)
- if (!PyArg_ParseTuple(args, "|n:read", &n)) {
+ if (!PyArg_ParseTuple(args, "|O&:read", &_PyIO_ConvertSsize_t, &n)) {
return NULL;
}
if (n < -1) {
@@ -953,10 +953,8 @@ buffered_readline(buffered *self, PyObject *args)
Py_ssize_t limit = -1;
CHECK_INITIALIZED(self)
-
- if (!PyArg_ParseTuple(args, "|n:readline", &limit)) {
+ if (!PyArg_ParseTuple(args, "|O&:readline", &_PyIO_ConvertSsize_t, &limit))
return NULL;
- }
return _buffered_readline(self, limit);
}