summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-09-30 12:03:02 (GMT)
committerGeorg Brandl <georg@python.org>2006-09-30 12:03:02 (GMT)
commit0988904df8da8fc484d050127b8e77eb47bd1ab8 (patch)
tree8ee694fc91395c978b9929557241b5c37f8474bd
parent1206a933cc0f485cc8764daba5564bf9677d8e02 (diff)
downloadcpython-0988904df8da8fc484d050127b8e77eb47bd1ab8.zip
cpython-0988904df8da8fc484d050127b8e77eb47bd1ab8.tar.gz
cpython-0988904df8da8fc484d050127b8e77eb47bd1ab8.tar.bz2
Bug #1546052: clarify that PyString_FromString(AndSize) copies the
string pointed to by its parameter. (backport from rev. 52078)
-rw-r--r--Doc/api/concrete.tex10
-rw-r--r--Misc/NEWS3
2 files changed, 8 insertions, 5 deletions
diff --git a/Doc/api/concrete.tex b/Doc/api/concrete.tex
index 34221ad..764c6aa 100644
--- a/Doc/api/concrete.tex
+++ b/Doc/api/concrete.tex
@@ -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}
diff --git a/Misc/NEWS b/Misc/NEWS
index c3cf131..424820d 100644
--- 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.