diff options
author | Fred Drake <fdrake@acm.org> | 2000-06-28 16:15:08 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2000-06-28 16:15:08 (GMT) |
commit | ec105d099385707db8c58c66a51b28e600501c4c (patch) | |
tree | 76bc236c2bd8a4ac8c384a4bd94b15767791963c /Doc/ext | |
parent | cabbc3be5bd48d4a3e30066e0588a85dd6ebb821 (diff) | |
download | cpython-ec105d099385707db8c58c66a51b28e600501c4c.zip cpython-ec105d099385707db8c58c66a51b28e600501c4c.tar.gz cpython-ec105d099385707db8c58c66a51b28e600501c4c.tar.bz2 |
Enhanced memory-reference information in the description of Py_BuildValue(),
based on response from Frank Stajano <fstajano@uk.research.att.com>.
Diffstat (limited to 'Doc/ext')
-rw-r--r-- | Doc/ext/ext.tex | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Doc/ext/ext.tex b/Doc/ext/ext.tex index 8de3158..4171da9 100644 --- a/Doc/ext/ext.tex +++ b/Doc/ext/ext.tex @@ -1004,7 +1004,11 @@ 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()}. +objects created by \cfunction{Py_BuildValue()}. In other words, if +your code invokes \cfunction{malloc()} and passes the allocated memory +to \cfunction{Py_BuildValue()}, your code is responsible for +calling \cfunction{free()} for that memory once +\cfunction{Py_BuildValue()} returns. In the following description, the quoted form is the format unit; the entry in (round) parentheses is the Python object type that the format |