FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.14] gh-156939: Document that PyBytesObject ends with a NUL byte (GH-157236) by miss-islington · Pull Request #157551 · python/cpython · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .rst  (2) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
6 changes: 6 additions & 0 deletions Doc/c-api/bytearray.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ Byte Array Objects

This subtype of :c:type:`PyObject` represents a Python bytearray object.

.. impl-detail::

The internal buffer of :c:type:`PyByteArrayObject` always includes an
extra trailing null byte for compatibility with null terminated C
strings. This extra byte is not counted in :c:func:`PyByteArray_Size`
nor in the *len* arguments of the functions below.

.. c:var:: PyTypeObject PyByteArray_Type

Expand Down
7 changes: 7 additions & 0 deletions Doc/c-api/bytes.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ Bytes Objects
These functions raise :exc:`TypeError` when expecting a bytes parameter and
called with a non-bytes parameter.

.. impl-detail::

The internal buffer of :c:type:`PyBytesObject` always includes an extra
trailing null byte for compatibility with null terminated C strings.
This extra byte is not counted in :c:func:`PyBytes_Size` nor in the
various *length* and *size* arguments of the functions below.

.. index:: pair: object; bytes


Expand Down
Loading

Back | FazBrowse Home | New Git URL