summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-06-28 15:32:29 (GMT)
committerFred Drake <fdrake@acm.org>2000-06-28 15:32:29 (GMT)
commit2b9e180ec36b5242e0e51b360b757dfa356aebea (patch)
tree9db32a00e9b80d0b2b421fe1ac2325bf0c1b1b0e
parentc19425d520527d93b82755cc8a9854388306515a (diff)
downloadcpython-2b9e180ec36b5242e0e51b360b757dfa356aebea.zip
cpython-2b9e180ec36b5242e0e51b360b757dfa356aebea.tar.gz
cpython-2b9e180ec36b5242e0e51b360b757dfa356aebea.tar.bz2
Added memory-reference information to the description of Py_BuildValue(),
based on comments from Frank Stajano <fstajano@uk.research.att.com>.
-rw-r--r--Doc/ext/ext.tex7
1 files changed, 6 insertions, 1 deletions
diff --git a/Doc/ext/ext.tex b/Doc/ext/ext.tex
index 683c11e..8de3158 100644
--- a/Doc/ext/ext.tex
+++ b/Doc/ext/ext.tex
@@ -1001,6 +1001,11 @@ exactly one format unit, it returns whatever object is described by
that format unit. To force it to return a tuple of size 0 or one,
parenthesize the format string.
+When memory buffers are passed as parameters to supply data to build
+objects, as for the \samp{s} and \samp{s\#} formats, the required data
+is copied. Buffers provided by the caller are never referenced by the
+objects created by \cfunction{Py_BuildValue()}.
+
In the following description, the quoted form is the format unit; the
entry in (round) parentheses is the Python object type that the format
unit will return; and the entry in [square] brackets is the type of
@@ -1014,7 +1019,7 @@ used to make long format strings a tad more readable.
\item[\samp{s} (string) {[char *]}]
Convert a null-terminated C string to a Python object. If the C
-string pointer is \NULL{}, \code{None} is returned.
+string pointer is \NULL{}, \code{None} is used.
\item[\samp{s\#} (string) {[char *, int]}]
Convert a C string and its length to a Python object. If the C string