summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/arg.rst
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2010-06-19 00:05:54 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2010-06-19 00:05:54 (GMT)
commiteb389715fbb9d47da55c744b6a3e14808860d3b8 (patch)
tree8cb41b5b1db1a0d7ad002c03bd0146ef67fbfec0 /Doc/c-api/arg.rst
parent2323d202896252706dd8ac1a73f11e93fae79822 (diff)
downloadcpython-eb389715fbb9d47da55c744b6a3e14808860d3b8.zip
cpython-eb389715fbb9d47da55c744b6a3e14808860d3b8.tar.gz
cpython-eb389715fbb9d47da55c744b6a3e14808860d3b8.tar.bz2
Merged revisions 82084 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r82084 | victor.stinner | 2010-06-19 01:59:45 +0200 (sam., 19 juin 2010) | 6 lines Issue #8939: Improve arg.rst * Add :ctype: to Py_BEGIN_ALLOW_THREADS and int * "s" and "s#" formats of Py_BuildValue(): specify that the Python object type is str in the description ........
Diffstat (limited to 'Doc/c-api/arg.rst')
-rw-r--r--Doc/c-api/arg.rst10
1 files changed, 5 insertions, 5 deletions
diff --git a/Doc/c-api/arg.rst b/Doc/c-api/arg.rst
index b637f4c..48c09f2 100644
--- a/Doc/c-api/arg.rst
+++ b/Doc/c-api/arg.rst
@@ -36,7 +36,7 @@ the ``es``, ``es#``, ``et`` and ``et#`` formats.
However, when a :ctype:`Py_buffer` structure gets filled, the underlying
buffer is locked so that the caller can subsequently use the buffer even
-inside a ``Py_BEGIN_ALLOW_THREADS`` block without the risk of mutable data
+inside a :ctype:`Py_BEGIN_ALLOW_THREADS` block without the risk of mutable data
being resized or destroyed. As a result, **you have to call**
:cfunc:`PyBuffer_Release` after you have finished processing the data (or
in any early abort case).
@@ -48,9 +48,9 @@ Unless otherwise stated, buffers are not NUL-terminated.
the length argument (int or :ctype:`Py_ssize_t`) is controlled by
defining the macro :cmacro:`PY_SSIZE_T_CLEAN` before including
:file:`Python.h`. If the macro was defined, length is a
- :ctype:`Py_ssize_t` rather than an int. This behavior will change
+ :ctype:`Py_ssize_t` rather than an :ctype:`int`. This behavior will change
in a future Python version to only support :ctype:`Py_ssize_t` and
- drop int support. It is best to always define :cmacro:`PY_SSIZE_T_CLEAN`.
+ drop :ctype:`int` support. It is best to always define :cmacro:`PY_SSIZE_T_CLEAN`.
``s`` (:class:`str`) [const char \*]
@@ -488,11 +488,11 @@ Building values
strings a tad more readable.
``s`` (:class:`str` or ``None``) [char \*]
- Convert a null-terminated C string to a Python object using ``'utf-8'``
+ Convert a null-terminated C string to a Python :class:`str` object using ``'utf-8'``
encoding. If the C string pointer is *NULL*, ``None`` is used.
``s#`` (:class:`str` or ``None``) [char \*, int]
- Convert a C string and its length to a Python object using ``'utf-8'``
+ Convert a C string and its length to a Python :class:`str` object using ``'utf-8'``
encoding. If the C string pointer is *NULL*, the length is ignored and
``None`` is returned.