mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
Issue #8592: PyArg_Parse*() functions raise a TypeError for "y", "u" and "Z"
formats if the string contains a null byte/character. Write unit tests for string formats.
This commit is contained in:
parent
edc5d20f3b
commit
06e49dd029
5 changed files with 317 additions and 5 deletions
|
@ -125,6 +125,8 @@ Unless otherwise stated, buffers are not NUL-terminated.
|
|||
pointer variable, which will be filled with the pointer to an existing
|
||||
Unicode buffer. Please note that the width of a :ctype:`Py_UNICODE`
|
||||
character depends on compilation options (it is either 16 or 32 bits).
|
||||
The Python string must not contain embedded NUL characters; if it does,
|
||||
a :exc:`TypeError` exception is raised.
|
||||
|
||||
.. note::
|
||||
Since ``u`` doesn't give you back the length of the string, and it
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue