diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-10-02 11:03:13 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-10-02 11:03:13 (GMT) |
commit | 1c24bd02520a647415de5c220834d7bec265a8d0 (patch) | |
tree | aee2e4580a0fb8b3027733119d4836566ac8b2d5 /Doc/c-api/unicode.rst | |
parent | 5a2da3b3adc6d36fcebac0c4aeceffa1ff4e4d33 (diff) | |
download | cpython-1c24bd02520a647415de5c220834d7bec265a8d0.zip cpython-1c24bd02520a647415de5c220834d7bec265a8d0.tar.gz cpython-1c24bd02520a647415de5c220834d7bec265a8d0.tar.bz2 |
Issue #8870: PyUnicode_AsWideCharString() doesn't count the trailing nul character
And write unit tests for PyUnicode_AsWideChar() and PyUnicode_AsWideCharString().
Diffstat (limited to 'Doc/c-api/unicode.rst')
-rw-r--r-- | Doc/c-api/unicode.rst | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/c-api/unicode.rst b/Doc/c-api/unicode.rst index 50a1254..45c46aa 100644 --- a/Doc/c-api/unicode.rst +++ b/Doc/c-api/unicode.rst @@ -466,7 +466,8 @@ wchar_t support for platforms which support it: Convert the Unicode object to a wide character string. The output string always ends with a nul character. If *size* is not *NULL*, write the number - of wide characters (including the nul character) into *\*size*. + of wide characters (excluding the trailing 0-termination character) into + *\*size*. Returns a buffer allocated by :cfunc:`PyMem_Alloc` (use :cfunc:`PyMem_Free` to free it) on success. On error, returns *NULL*, *\*size* is undefined and |