[Python-Dev] r84456 - python/branches/py3k/Doc/c-api/unicode.rst

Georg Brandl g.brandl at gmx.net
Fri Sep 3 20:07:54 CEST 2010


Please add a "versionadded" tag.

Georg

Am 03.09.2010 18:23, schrieb victor.stinner:
> Author: victor.stinner
> Date: Fri Sep  3 18:23:29 2010
> New Revision: 84456
> 
> Log:
> Document PyUnicode_AsUnicodeCopy()
> 
> 
> Modified:
>    python/branches/py3k/Doc/c-api/unicode.rst
> 
> Modified: python/branches/py3k/Doc/c-api/unicode.rst
> ==============================================================================
> --- python/branches/py3k/Doc/c-api/unicode.rst	(original)
> +++ python/branches/py3k/Doc/c-api/unicode.rst	Fri Sep  3 18:23:29 2010
> @@ -335,6 +335,14 @@
>     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.


-- 
Thus spake the Lord: Thou shalt indent with four spaces. No more, no less.
Four shall be the number of spaces thou shalt indent, and the number of thy
indenting shall be four. Eight shalt thou not indent, nor either indent thou
two, excepting that thou then proceed to four. Tabs are right out.



More information about the Python-Dev mailing list