summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/bytearray.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/c-api/bytearray.rst')
-rw-r--r--Doc/c-api/bytearray.rst32
1 files changed, 16 insertions, 16 deletions
diff --git a/Doc/c-api/bytearray.rst b/Doc/c-api/bytearray.rst
index 5e11d8a..95ded96 100644
--- a/Doc/c-api/bytearray.rst
+++ b/Doc/c-api/bytearray.rst
@@ -8,27 +8,27 @@ Byte Array Objects
.. index:: object: bytearray
-.. ctype:: PyByteArrayObject
+.. c:type:: PyByteArrayObject
- This subtype of :ctype:`PyObject` represents a Python bytearray object.
+ This subtype of :c:type:`PyObject` represents a Python bytearray object.
-.. cvar:: PyTypeObject PyByteArray_Type
+.. c:var:: PyTypeObject PyByteArray_Type
- This instance of :ctype:`PyTypeObject` represents the Python bytearray type;
+ This instance of :c:type:`PyTypeObject` represents the Python bytearray type;
it is the same object as :class:`bytearray` in the Python layer.
Type check macros
^^^^^^^^^^^^^^^^^
-.. cfunction:: int PyByteArray_Check(PyObject *o)
+.. c:function:: int PyByteArray_Check(PyObject *o)
Return true if the object *o* is a bytearray object or an instance of a
subtype of the bytearray type.
-.. cfunction:: int PyByteArray_CheckExact(PyObject *o)
+.. c:function:: int 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.
@@ -37,7 +37,7 @@ Type check macros
Direct API functions
^^^^^^^^^^^^^^^^^^^^
-.. cfunction:: PyObject* PyByteArray_FromObject(PyObject *o)
+.. c:function:: PyObject* PyByteArray_FromObject(PyObject *o)
Return a new bytearray object from any object, *o*, that implements the
buffer protocol.
@@ -45,29 +45,29 @@ Direct API functions
.. XXX expand about the buffer protocol, at least somewhere
-.. cfunction:: PyObject* PyByteArray_FromStringAndSize(const char *string, Py_ssize_t len)
+.. c:function:: PyObject* PyByteArray_FromStringAndSize(const char *string, Py_ssize_t len)
Create a new bytearray object from *string* and its length, *len*. On
failure, *NULL* is returned.
-.. cfunction:: PyObject* PyByteArray_Concat(PyObject *a, PyObject *b)
+.. c:function:: PyObject* PyByteArray_Concat(PyObject *a, PyObject *b)
Concat bytearrays *a* and *b* and return a new bytearray with the result.
-.. cfunction:: Py_ssize_t PyByteArray_Size(PyObject *bytearray)
+.. c:function:: Py_ssize_t PyByteArray_Size(PyObject *bytearray)
Return the size of *bytearray* after checking for a *NULL* pointer.
-.. cfunction:: char* PyByteArray_AsString(PyObject *bytearray)
+.. c:function:: char* PyByteArray_AsString(PyObject *bytearray)
Return the contents of *bytearray* as a char array after checking for a
*NULL* pointer.
-.. cfunction:: int PyByteArray_Resize(PyObject *bytearray, Py_ssize_t len)
+.. c:function:: int PyByteArray_Resize(PyObject *bytearray, Py_ssize_t len)
Resize the internal buffer of *bytearray* to *len*.
@@ -76,11 +76,11 @@ Macros
These macros trade safety for speed and they don't check pointers.
-.. cfunction:: char* PyByteArray_AS_STRING(PyObject *bytearray)
+.. c:function:: char* PyByteArray_AS_STRING(PyObject *bytearray)
- Macro version of :cfunc:`PyByteArray_AsString`.
+ Macro version of :c:func:`PyByteArray_AsString`.
-.. cfunction:: Py_ssize_t PyByteArray_GET_SIZE(PyObject *bytearray)
+.. c:function:: Py_ssize_t PyByteArray_GET_SIZE(PyObject *bytearray)
- Macro version of :cfunc:`PyByteArray_Size`.
+ Macro version of :c:func:`PyByteArray_Size`.