summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/bytearray.rst
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2015-05-14 00:31:53 (GMT)
committerR David Murray <rdmurray@bitdance.com>2015-05-14 00:31:53 (GMT)
commit0a560a11af0ccc816d1172180f44e5afb34ba600 (patch)
treecb2c682afc53a3831003560d529f8bba4047eddb /Doc/c-api/bytearray.rst
parent3afdb2870ff83ebb32a8c19260be7ced0567ac66 (diff)
downloadcpython-0a560a11af0ccc816d1172180f44e5afb34ba600.zip
cpython-0a560a11af0ccc816d1172180f44e5afb34ba600.tar.gz
cpython-0a560a11af0ccc816d1172180f44e5afb34ba600.tar.bz2
#23088: Clarify null termination of bytes and strings in C API.
Patch by Martin Panter, reviewed by Serhiy Storchaka and R. David Murray.
Diffstat (limited to 'Doc/c-api/bytearray.rst')
-rw-r--r--Doc/c-api/bytearray.rst3
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/c-api/bytearray.rst b/Doc/c-api/bytearray.rst
index 8202205..41b6e3c 100644
--- a/Doc/c-api/bytearray.rst
+++ b/Doc/c-api/bytearray.rst
@@ -64,7 +64,8 @@ Direct API functions
.. c:function:: char* PyByteArray_AsString(PyObject *bytearray)
Return the contents of *bytearray* as a char array after checking for a
- *NULL* pointer.
+ *NULL* pointer. The returned array always has an extra
+ null byte appended.
.. c:function:: int PyByteArray_Resize(PyObject *bytearray, Py_ssize_t len)