summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2010-06-13 18:21:50 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2010-06-13 18:21:50 (GMT)
commit06e49dd0297beff7c8462025badfcc561c8c35c8 (patch)
treed43acb0142df447b8e51eb0e60f68c81f02d09c3 /Doc
parentedc5d20f3b3c958caa070750576f64198bc724cb (diff)
downloadcpython-06e49dd0297beff7c8462025badfcc561c8c35c8.zip
cpython-06e49dd0297beff7c8462025badfcc561c8c35c8.tar.gz
cpython-06e49dd0297beff7c8462025badfcc561c8c35c8.tar.bz2
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.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/c-api/arg.rst2
1 files changed, 2 insertions, 0 deletions
diff --git a/Doc/c-api/arg.rst b/Doc/c-api/arg.rst
index ea897a8..1c49c8b 100644
--- a/Doc/c-api/arg.rst
+++ b/Doc/c-api/arg.rst
@@ -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