Document PyUnicode_AsUnicodeCopy()

This commit is contained in:
Victor Stinner 2010-09-03 16:23:29 +00:00
parent 46408606d8
commit e4ea994f20
1 changed files with 8 additions and 0 deletions

View File

@ -335,6 +335,14 @@ APIs:
buffer, *NULL* if *unicode* is not a Unicode object.
.. cfunction:: Py_UNICODE* PyUnicode_AsUnicodeCopy(PyObject *unicode)
Create a copy of a unicode string ending with a nul character. Return *NULL*
and raise a :exc:`MemoryError` exception on memory allocation failure,
otherwise return a new allocated buffer (use :cfunc:`PyMem_Free` to free the
buffer).
.. cfunction:: Py_ssize_t PyUnicode_GetSize(PyObject *unicode)
Return the length of the Unicode object.