Source

opycaml / bytearray.idl.in

// -------------------------- Byte array

// PyByteArrayObject;
//    This subtype of PyObject represents a Python bytearray object.

// PyTypeObject PyByteArray_Type;
//    This instance of PyTypeObject represents the Python bytearray type; it is the same object as bytearray in the Python layer.

boolean PyByteArray_Check(PyObject *o);
//    Return true if the object o is a bytearray object or an instance of a subtype of the bytearray type.

boolean PyByteArray_CheckExact(PyObject *o);
//    Return true if the object o is a bytearray object, but not an instance of a subtype of the bytearray type.

[new] PyByteArrayObject* PyByteArray_FromObject(PyObject *o);
//    Return a new bytearray object from any object, o, that implements the buffer protocol.

[new] PyByteArrayObject* PyByteArray_FromStringAndSize([string] const char *string, Py_ssize_t len);
//    Create a new bytearray object from string and its length, len. On failure, NULL is returned.

[new] PyByteArrayObject* PyByteArray_Concat(PyByteArrayObject *a, PyByteArrayObject *b); [mlname concatByteArray]
//    Concat bytearrays a and b and return a new bytearray with the result.

size_or_fail PyByteArray_Size(PyByteArrayObject *bytearray);
//    Return the size of bytearray after checking for a NULL pointer.

[string] char* PyByteArray_AsString(PyByteArrayObject *bytearray);
//    Return the contents of bytearray as a char array after checking for a NULL pointer.

unit_or_fail /* ? */ PyByteArray_Resize(PyByteArrayObject *bytearray, Py_ssize_t len); // return type is int
//    Resize the internal buffer of bytearray to len.

// These macros trade safety for speed and they don’t check pointers.

[string] char* PyByteArray_AS_STRING(PyByteArrayObject *bytearray);
//    Macro version of PyByteArray_AsString().

Py_ssize_t PyByteArray_GET_SIZE(PyByteArrayObject *bytearray);
//    Macro version of PyByteArray_Size().
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.