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

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 PyUnicodeAsUnicodeCopy()

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:: PyUNICODE* PyUnicodeAsUnicodeCopy(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:PyMemFree to free the + buffer). + + .. cfunction:: Pyssizet PyUnicodeGetSize(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