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. */
if (PyLong_Check(arg)) {
size = PyLong_AsSsize_t(arg);
+ if (size == -1 && PyErr_Occurred())
+ return NULL;
}
else if (arg == Py_None) {
/* No size limit, by default. */
if (PyLong_Check(arg)) {
maxsize = PyLong_AsSsize_t(arg);
+ if (maxsize == -1 && PyErr_Occurred())
+ return NULL;
}
else if (arg == Py_None) {
/* No size limit, by default. */
if (PyLong_Check(arg)) {
size = PyLong_AsSsize_t(arg);
+ if (size == -1 && PyErr_Occurred())
+ return NULL;
}
else if (arg == Py_None) {
/* Truncate to current position if no argument is passed. */
/* Extract the offset from the first argument */
offset = PyLong_AsSsize_t(PyTuple_GET_ITEM(args, 1));
+ if (offset == -1 && PyErr_Occurred())
+ return NULL;
/* Support negative offsets. */
if (offset < 0)