Commit e0a4213f authored by Georg Brandl's avatar Georg Brandl

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

string pointed to by its parameter.
 (backport from rev. 52078)
parent 4a658756
...@@ -602,15 +602,15 @@ parameter and are called with a non-string parameter. ...@@ -602,15 +602,15 @@ parameter and are called with a non-string parameter.
\end{cfuncdesc} \end{cfuncdesc}
\begin{cfuncdesc}{PyObject*}{PyString_FromString}{const char *v} \begin{cfuncdesc}{PyObject*}{PyString_FromString}{const char *v}
Return a new string object with the value \var{v} on success, and Return a new string object with a copy of the string \var{v} as value
\NULL{} on failure. The parameter \var{v} must not be \NULL{}; it on success, and \NULL{} on failure. The parameter \var{v} must not be
will not be checked. \NULL{}; it will not be checked.
\end{cfuncdesc} \end{cfuncdesc}
\begin{cfuncdesc}{PyObject*}{PyString_FromStringAndSize}{const char *v, \begin{cfuncdesc}{PyObject*}{PyString_FromStringAndSize}{const char *v,
Py_ssize_t len} Py_ssize_t len}
Return a new string object with the value \var{v} and length Return a new string object with a copy of the string \var{v} as value
\var{len} on success, and \NULL{} on failure. If \var{v} is and length \var{len} on success, and \NULL{} on failure. If \var{v} is
\NULL{}, the contents of the string are uninitialized. \NULL{}, the contents of the string are uninitialized.
\end{cfuncdesc} \end{cfuncdesc}
......
...@@ -163,6 +163,9 @@ Tests ...@@ -163,6 +163,9 @@ Tests
Documentation 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 #1566663: remove obsolete example from datetime docs.
- Bug #1541682: Fix example in the "Refcount details" API docs. - Bug #1541682: Fix example in the "Refcount details" API docs.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment