Use long long if available for readline() as well.
@@ -1521,7 +1521,11 @@ static PyObject *Input_read(InputObject *self, PyObject *args)
static PyObject *Input_readline(InputObject *self, PyObject *args)
{
- apr_off_t size = -1;
+#if defined(HAVE_LONG_LONG)
+ PY_LONG_LONG size = -1;
+#else
+ long size = -1;
+#endif
PyObject *result = NULL;
char *buffer = NULL;
@@ -1534,8 +1538,13 @@ static PyObject *Input_readline(InputObject *self, PyObject *args)
return NULL;
}
+#if defined(HAVE_LONG_LONG)
+ if (!PyArg_ParseTuple(args, "|L:readline", &size))
+ return NULL;
+#else
if (!PyArg_ParseTuple(args, "|l:readline", &size))
return NULL;
+#endif
if (self->seen_error) {
PyErr_SetString(PyExc_IOError, "Apache/mod_wsgi request data read "
