mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
#23088: Clarify null termination of bytes and strings in C API.
Patch by Martin Panter, reviewed by Serhiy Storchaka and R. David Murray.
This commit is contained in:
parent
3afdb2870f
commit
0a560a11af
3 changed files with 44 additions and 31 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue