Issue 33740: PyByteArray_AsString C-API description lacks the assurance, that the trailing null-byte is appended.
Created on 2018-06-02 21:10 by realead, last changed 2022-04-11 14:59 by admin. This issue is now closed.
| Messages (3) | |||
|---|---|---|---|
| msg318515 - (view) | Author: (realead) | Date: 2018-06-02 21:10 | |
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 |
|||
| msg356737 - (view) | Author: Batuhan Taskaya (BTaskaya) * ![]() |
Date: 2019-11-16 00:13 | |
IMHO there is no need/way for adding that clarification after this date (1.5 months left). |
|||
| msg370458 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2020-05-31 13:50 | |
Python 2.7 is no longer supported. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:01 | admin | set | github: 77921 |
| 2020-05-31 13:50:39 | serhiy.storchaka | set | status: open -> closed nosy:
+ serhiy.storchaka resolution: out of date |
| 2019-11-16 00:13:41 | BTaskaya | set | nosy:
+ benjamin.peterson, BTaskaya messages: + msg356737 |
| 2018-06-02 21:10:56 | realead | create | |
