From acaa5a16d6cd9a94e7e111761264eef14a033d2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Walter=20D=C3=B6rwald?= Date: Sat, 5 May 2007 12:00:46 +0000 Subject: Add PyUnicode_FromString(), which create a unicode object from a const char * (i.e. 0-terminated latin-1 encoded bytes). --- Doc/api/concrete.tex | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Doc/api') diff --git a/Doc/api/concrete.tex b/Doc/api/concrete.tex index cdf6856a35..e1ab3ec6f3 100644 --- a/Doc/api/concrete.tex +++ b/Doc/api/concrete.tex @@ -995,6 +995,17 @@ use these APIs: \var{u} is \NULL{}. \end{cfuncdesc} +\begin{cfuncdesc}{PyObject*}{PyUnicode_FromString}{const char *u} + Create a Unicode Object from the char buffer \var{u} of the. + \var{u} must be 0-terminated, the bytes will be interpreted as + being latin-1 encoded. \var{u} may also be \NULL{} which causes the + contents to be undefined. It is the user's responsibility to fill + in the needed data. The buffer is copied into the new object. + If the buffer is not \NULL{}, the return value might be a shared object. + Therefore, modification of the resulting Unicode object is only allowed + when \var{u} is \NULL{}. +\end{cfuncdesc} + \begin{cfuncdesc}{Py_UNICODE*}{PyUnicode_AsUnicode}{PyObject *unicode} Return a read-only pointer to the Unicode object's internal \ctype{Py_UNICODE} buffer, \NULL{} if \var{unicode} is not a Unicode -- cgit v1.2.1