search for: py_return_tru

Displaying 1 result from an estimated 1 matches for "py_return_tru".

Did you mean: py_return_true
2020 Jan 30
2
[PATCH libnbd] python: Add AIO buffer is_zero method.
...{ + PyObject *obj; + struct py_aio_buffer *buf; + Py_ssize_t offset, size; + + if (!PyArg_ParseTuple (args, + (char *) "Onn:nbd_internal_py_aio_buffer_size", + &obj, &offset, &size)) + return NULL; + + if (size == 0) + Py_RETURN_TRUE; + + buf = nbd_internal_py_get_aio_buffer (obj); + if (buf == NULL) + return NULL; + + /* Check the bounds of the offset. */ + if (offset < 0 || offset > buf->len) { + PyErr_SetString (PyExc_IndexError, "offset out of range"); + return NULL; + } + + /* Compute or...