picop.cybuffer#
Buffer protocol helpers.
- picop.cybuffer.buf_check(obj)#
Return True if
objsupports the buffer protocol (PyObject_CheckBuffer). :type obj:object:param obj:
- picop.cybuffer.buf_copy_data(dest, src)#
Copy buffer data from
srcinto writabledestviaPyObject_CopyData.Notes
Returns
0on success and-1on error; errors raise. Do not use the status int as a bool.
- picop.cybuffer.buf_eq(a, b)#
Return True if buffer-protocol views are equal.
Notes
C-contiguous buffers use
memcmp; otherwise memoryview richcompare. Format/size mismatch yieldsFalse.
- picop.cybuffer.buf_itemsize(obj)#
Return the item size of
obj’s exported buffer. :type obj:object:param obj:- Return type:
- picop.cybuffer.buf_nbytes(obj)#
Return the total byte length of
obj’s exported buffer. :type obj:object:param obj:- Return type: