File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,6 +12,12 @@ Byte Array Objects
1212
1313 This subtype of :c:type: `PyObject ` represents a Python bytearray object.
1414
15+ .. impl-detail ::
16+
17+ The internal buffer of :c:type: `PyByteArrayObject ` always includes an
18+ extra trailing null byte for compatibility with null terminated C
19+ strings. This extra byte is not counted in :c:func: `PyByteArray_Size `
20+ nor in the *len * arguments of the functions below.
1521
1622.. c :var :: PyTypeObject PyByteArray_Type
1723
Original file line number Diff line number Diff line change @@ -8,6 +8,13 @@ Bytes Objects
88These functions raise :exc: `TypeError ` when expecting a bytes parameter and
99called with a non-bytes parameter.
1010
11+ .. impl-detail ::
12+
13+ The internal buffer of :c:type: `PyBytesObject ` always includes an extra
14+ trailing null byte for compatibility with null terminated C strings.
15+ This extra byte is not counted in :c:func: `PyBytes_Size ` nor in the
16+ various *length * and *size * arguments of the functions below.
17+
1118.. index :: pair: object; bytes
1219
1320
You can’t perform that action at this time.
0 commit comments