mirror of
https://github.com/python/cpython.git
synced 2025-11-01 02:38:53 +00:00
Issue #9979: Create function PyUnicode_AsWideCharString().
This commit is contained in:
parent
41a64a53a3
commit
137c34c027
4 changed files with 80 additions and 16 deletions
|
|
@ -462,6 +462,19 @@ wchar_t support for platforms which support it:
|
|||
required by the application.
|
||||
|
||||
|
||||
.. cfunction:: wchar_t* PyUnicode_AsWideCharString(PyUnicodeObject *unicode, Py_ssize_t *size)
|
||||
|
||||
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*.
|
||||
|
||||
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
|
||||
raises a :exc:`MemoryError`.
|
||||
|
||||
.. versionadded:: 3.2
|
||||
|
||||
|
||||
.. _builtincodecs:
|
||||
|
||||
Built-in Codecs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue