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:
Victor Stinner 2010-06-13 18:21:50 +00:00
parent edc5d20f3b
commit 06e49dd029
5 changed files with 317 additions and 5 deletions

View file

@ -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