8000 gh-122623: Improve `c-api/bytearray.rst` with error handling info by sobolevn · Pull Request #122624 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-122623: Improve c-api/bytearray.rst with error handling info #122624

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 3, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
gh-122623: Improve c-api/bytearray.rst with error handling info
  • Loading branch information
sobolevn committed Aug 2, 2024
commit aae357107b9d4a302601993f256aba11c45ba4e5
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
Loading
0