Skip to content

Commit

Permalink
pythongh-122623: Improve c-api/bytearray.rst with error handling info
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn committed Aug 2, 2024
1 parent 498376d commit aae3571
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Doc/c-api/bytearray.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,22 @@ Direct API functions
Return a new bytearray object from any object, *o*, that implements the
:ref:`buffer protocol <bufferobjects>`.
On failure, ``NULL`` is returned with an exception set.
.. 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.
Create a new bytearray object from *string* and its length, *len*.
On failure, ``NULL`` is returned with an exception set.
.. c:function:: PyObject* PyByteArray_Concat(PyObject *a, PyObject *b)
Concat bytearrays *a* and *b* and return a new bytearray with the result.
On failure, ``NULL`` is returned with an exception set.
.. c:function:: Py_ssize_t PyByteArray_Size(PyObject *bytearray)
Expand Down

0 comments on commit aae3571

Please sign in to comment.