New in version 2.6.
PyByteArrayObject
PyObject
represents a Python bytearray object.PyByteArray_Type
PyTypeObject
represents the Python bytearray type; it is the same object as bytearray
in the Python layer.PyByteArray_Check
(PyObject *o)PyByteArray_CheckExact
(PyObject *o)
PyByteArray_FromObject
(PyObject *o)PyByteArray_FromStringAndSize
(const char *string, Py_ssize_t len)PyByteArray_Concat
(PyObject *a, PyObject *b)PyByteArray_Size
(PyObject *bytearray)PyByteArray_AsString
(PyObject *bytearray)PyByteArray_Resize
(PyObject *bytearray, Py_ssize_t len)
These macros trade safety for speed and they don’t check pointers.
PyByteArray_AS_STRING
(PyObject *bytearray)PyByteArray_AsString()
.PyByteArray_GET_SIZE
(PyObject *bytearray)PyByteArray_Size()
.