@@ -18,6 +18,8 @@ Byte Array Objects
1818 This instance of :ctype: `PyTypeObject ` represents the Python bytearray type;
1919 it is the same object as ``bytearray `` in the Python layer.
2020
21+ Type check macros
22+ ^^^^^^^^^^^^^^^^^
2123
2224.. cfunction :: int PyByteArray_Check(PyObject *o)
2325
@@ -31,6 +33,9 @@ Byte Array Objects
3133 subtype of the bytearray type.
3234
3335
36+ Direct API functions
37+ ^^^^^^^^^^^^^^^^^^^^
38+
3439.. cfunction :: PyObject* PyByteArray_FromObject(PyObject *o)
3540
3641 Return a new bytearray object from any object, *o *, that implements the
@@ -45,14 +50,14 @@ Byte Array Objects
4550 failure, *NULL * is returned.
4651
4752
48- .. cfunction :: Py_ssize_t PyByteArray_Size (PyObject *bytearray )
53+ .. cfunction :: PyObject* PyByteArray_Concat (PyObject *a, PyObject *b )
4954
50- Return the size of * bytearray * after checking for a * NULL * pointer .
55+ Concat bytearrays * a * and * b * and return a new bytearray with the result .
5156
5257
53- .. cfunction :: Py_ssize_t PyByteArray_GET_SIZE (PyObject *bytearray)
58+ .. cfunction :: Py_ssize_t PyByteArray_Size (PyObject *bytearray)
5459
55- Macro version of :cfunc: ` PyByteArray_Size ` that doesn't do pointer checking .
60+ Return the size of * bytearray * after checking for a * NULL * pointer .
5661
5762
5863.. cfunction :: char* PyByteArray_AsString(PyObject *bytearray)
@@ -61,16 +66,20 @@ Byte Array Objects
6166 *NULL * pointer.
6267
6368
64- .. cfunction :: char* PyByteArray_AS_STRING (PyObject *bytearray)
69+ .. cfunction :: int PyByteArray_Resize (PyObject *bytearray, Py_ssize_t len )
6570
66- Macro version of :cfunc: ` PyByteArray_AsString ` that doesn't check pointers .
71+ Resize the internal buffer of * bytearray * to * len * .
6772
73+ Macros
74+ ^^^^^^
6875
69- .. cfunction :: PyObject* PyByteArray_Concat(PyObject *a, PyObject *b)
76+ These macros trade safety for speed and they don't check pointers.
7077
71- Concat bytearrays * a * and * b * and return a new bytearray with the result.
78+ .. cfunction :: char* PyByteArray_AS_STRING(PyObject * bytearray)
7279
80+ Macro version of :cfunc: `PyByteArray_AsString `.
7381
74- .. cfunction :: PyObject* PyByteArray_Resize(PyObject *bytearray, Py_ssize_t len)
7582
76- Resize the internal buffer of *bytearray * to *len *.
83+ .. cfunction :: Py_ssize_t PyByteArray_GET_SIZE(PyObject *bytearray)
84+
85+ Macro version of :cfunc: `PyByteArray_Size `.
0 commit comments