]> granicus.if.org Git - python/commitdiff
Bug #1546052: clarify that PyString_FromString(AndSize) copies the
authorGeorg Brandl <georg@python.org>
Sat, 30 Sep 2006 12:03:02 +0000 (12:03 +0000)
committerGeorg Brandl <georg@python.org>
Sat, 30 Sep 2006 12:03:02 +0000 (12:03 +0000)
string pointed to by its parameter.
 (backport from rev. 52078)

Doc/api/concrete.tex
Misc/NEWS

index 34221ad3af868741935d8032a129b0412757d7bd..764c6aa90fd90f94ec41fc9317ec3bd0b560d45f 100644 (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}
 
index c3cf131c0472fbb85d50e220742ec6d884a4f90c..424820d03e2b410b2b0577a49ecde68daf308791 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -163,6 +163,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.