diff options
author | Marc-André Lemburg <mal@egenix.com> | 2004-11-22 13:02:31 (GMT) |
---|---|---|
committer | Marc-André Lemburg <mal@egenix.com> | 2004-11-22 13:02:31 (GMT) |
commit | a9cadcd41b27fd045626c4e3b98315aaa257ca75 (patch) | |
tree | de54d0594b72a0b5fbdd6eaecd28a47837597d02 /Doc/api/concrete.tex | |
parent | 6d60c0962444bb8f6d13208489095144e7752924 (diff) | |
download | cpython-a9cadcd41b27fd045626c4e3b98315aaa257ca75.zip cpython-a9cadcd41b27fd045626c4e3b98315aaa257ca75.tar.gz cpython-a9cadcd41b27fd045626c4e3b98315aaa257ca75.tar.bz2 |
Correct the handling of 0-termination of PyUnicode_AsWideChar()
and its usage in PyLocale_strcoll().
Clarify the documentation on this.
Thanks to Andreas Degert for pointing this out.
Diffstat (limited to 'Doc/api/concrete.tex')
-rw-r--r-- | Doc/api/concrete.tex | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Doc/api/concrete.tex b/Doc/api/concrete.tex index af026ff..001d0ad 100644 --- a/Doc/api/concrete.tex +++ b/Doc/api/concrete.tex @@ -995,9 +995,13 @@ following functions. Support is optimized if Python's own wchar_t *w, int size} Copies the Unicode object contents into the \ctype{wchar_t} buffer - \var{w}. At most \var{size} \ctype{wchar_t} characters are copied. - Returns the number of \ctype{wchar_t} characters copied or -1 in - case of an error. + \var{w}. At most \var{size} \ctype{wchar_t} characters are copied + (excluding a possibly trailing 0-termination character). Returns + the number of \ctype{wchar_t} characters copied or -1 in case of an + error. Note that the resulting \ctype{wchar_t} string may or may + not be 0-terminated. It is the responsibility of the caller to make + sure that the \ctype{wchar_t} string is 0-terminated in case this is + required by the application. \end{cfuncdesc} |