mirror of
https://github.com/python/cpython.git
synced 2025-08-11 12:29:34 +00:00
[3.12] gh-113437: Update documentation about PyUnicode_AsWideChar() function (GH-113455) (GH-115407)
(cherry picked from commit 5719aa23ab
)
Co-authored-by: qqwqqw689 <114795525+qqwqqw689@users.noreply.github.com>
This commit is contained in:
parent
9c7307520d
commit
03d2c3b804
1 changed files with 6 additions and 1 deletions
|
@ -861,7 +861,12 @@ wchar_t Support
|
||||||
Copy the Unicode object contents into the :c:type:`wchar_t` buffer *wstr*. At most
|
Copy the Unicode object contents into the :c:type:`wchar_t` buffer *wstr*. At most
|
||||||
*size* :c:type:`wchar_t` characters are copied (excluding a possibly trailing
|
*size* :c:type:`wchar_t` characters are copied (excluding a possibly trailing
|
||||||
null termination character). Return the number of :c:type:`wchar_t` characters
|
null termination character). Return the number of :c:type:`wchar_t` characters
|
||||||
copied or ``-1`` in case of an error. Note that the resulting :c:expr:`wchar_t*`
|
copied or ``-1`` in case of an error.
|
||||||
|
|
||||||
|
When *wstr* is ``NULL``, instead return the *size* that would be required
|
||||||
|
to store all of *unicode* including a terminating null.
|
||||||
|
|
||||||
|
Note that the resulting :c:expr:`wchar_t*`
|
||||||
string may or may not be null-terminated. It is the responsibility of the caller
|
string may or may not be null-terminated. It is the responsibility of the caller
|
||||||
to make sure that the :c:expr:`wchar_t*` string is null-terminated in case this is
|
to make sure that the :c:expr:`wchar_t*` string is null-terminated in case this is
|
||||||
required by the application. Also, note that the :c:expr:`wchar_t*` string
|
required by the application. Also, note that the :c:expr:`wchar_t*` string
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue