summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSandro Tosi <sandro.tosi@gmail.com>2012-01-01 22:41:44 (GMT)
committerSandro Tosi <sandro.tosi@gmail.com>2012-01-01 22:41:44 (GMT)
commit8448dfa17d4c3bf9009bdb600640d7e550bad734 (patch)
tree77514f5029f1c94875df19a39e7f3434d4547223
parente827c13566358136ab078475809404822aa76cb4 (diff)
downloadcpython-8448dfa17d4c3bf9009bdb600640d7e550bad734.zip
cpython-8448dfa17d4c3bf9009bdb600640d7e550bad734.tar.gz
cpython-8448dfa17d4c3bf9009bdb600640d7e550bad734.tar.bz2
Issue #13302: backport part of 3ed28f28466f
-rw-r--r--Doc/c-api/arg.rst5
1 files changed, 5 insertions, 0 deletions
diff --git a/Doc/c-api/arg.rst b/Doc/c-api/arg.rst
index 6599d82..4f8591b 100644
--- a/Doc/c-api/arg.rst
+++ b/Doc/c-api/arg.rst
@@ -24,6 +24,11 @@ the format unit; the entry in (round) parentheses is the Python object type
that matches the format unit; and the entry in [square] brackets is the type
of the C variable(s) whose address should be passed.
+These formats allow to access an object as a contiguous chunk of memory.
+You don't have to provide raw storage for the returned unicode or bytes
+area. Also, you won't have to release any memory yourself, except with the
+``es``, ``es#``, ``et`` and ``et#`` formats.
+
``s`` (string or Unicode) [const char \*]
Convert a Python string or Unicode object to a C pointer to a character
string. You must not provide storage for the string itself; a pointer to