Bug #1546052: clarify that PyString_FromString(AndSize) copies the

string pointed to by its parameter.
This commit is contained in:
Georg Brandl 2006-09-30 12:02:57 +00:00
parent a92979a1db
commit 44a7b3a765
2 changed files with 8 additions and 5 deletions

View File

@ -602,15 +602,15 @@ parameter and are called with a non-string parameter.
\end{cfuncdesc}
\begin{cfuncdesc}{PyObject*}{PyString_FromString}{const char *v}
Return a new string object with the value \var{v} on success, and
\NULL{} on failure. The parameter \var{v} must not be \NULL{}; it
will not be checked.
Return a new string object with a copy of the string \var{v} as value
on success, and \NULL{} on failure. The parameter \var{v} must not be
\NULL{}; it will not be checked.
\end{cfuncdesc}
\begin{cfuncdesc}{PyObject*}{PyString_FromStringAndSize}{const char *v,
Py_ssize_t len}
Return a new string object with the value \var{v} and length
\var{len} on success, and \NULL{} on failure. If \var{v} is
Return a new string object with a copy of the string \var{v} as value
and length \var{len} on success, and \NULL{} on failure. If \var{v} is
\NULL{}, the contents of the string are uninitialized.
\end{cfuncdesc}

View File

@ -146,6 +146,9 @@ Tests
Documentation
-------------
- Bug #1546052: clarify that PyString_FromString(AndSize) copies the
string pointed to by its parameter.
- Bug #1566663: remove obsolete example from datetime docs.
- Bug #1541682: Fix example in the "Refcount details" API docs.