Skip to content

Commit 18ec24d

Browse files
committed
Documentation
1 parent c4f4c07 commit 18ec24d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Doc/c-api/bytes.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,9 @@ PyBytesWriter
237237
238238
Create a :c:type:`PyBytesWriter` to write *alloc* bytes.
239239
240+
If *alloc* is greater than zero, allocate *alloc* bytes for the returned
241+
buffer.
242+
240243
On success, return non-``NULL`` buffer where bytes can be written.
241244
On error, set an exception and return ``NULL``.
242245
@@ -259,7 +262,9 @@ PyBytesWriter
259262
260263
.. c:function:: void* PyBytesWriter_Extend(PyBytesWriter *writer, void *buf, Py_ssize_t extend)
261264
262-
Extend the buffer by *extend* bytes.
265+
Add *extend* bytes to the buffer: allocate *extend* bytes in addition to
266+
bytes already allocated by previous :c:func:`PyBytesWriter_Create` and
267+
:c:func:`PyBytesWriter_Extend` calls.
263268
264269
On success, return non-``NULL`` buffer where bytes can be written.
265270
On error, set an exception and return ``NULL``.

0 commit comments

Comments
 (0)