[docs] [issue33740] PyByteArray_AsString C-API description lacks the assurance, that the trailing null-byte is appended.
report at bugs.python.org
Sat Jun 2 17:10:56 EDT 2018
New submission from Egor Dranischnikow <no-one at turm-lahnstein.de>:
The C-API for Python2.7 https://docs.python.org/2/c-api/bytearray.html#c.PyByteArray_AsString
lacks the sentence: "The returned array always has an extra null byte appended." which clarifies, that the returned C-string is null-terminated.
This sentence is a part of Python3-documentation: https://docs.python.org/3/c-api/bytearray.html#c.PyByteArray_AsString
I might be very wrong, but so far I understand the code this is the case for both versions, Python3 and Python2.
Probably parts of this change https://github.com/python/cpython/commit/0a560a11af0ccc816d1172180f44e5afb34ba600 could be integrated in Python2.7
assignee: docs at python
nosy: docs at python, realead
title: PyByteArray_AsString C-API description lacks the assurance, that the trailing null-byte is appended.
versions: Python 2.7
Python tracker <report at bugs.python.org>
More information about the docs