Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit eb38971

Browse files
author
Victor Stinner
committed
Merged revisions 82084 via svnmerge from
svn+ssh://[email protected]/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 ........
1 parent 2323d20 commit eb38971

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

Doc/c-api/arg.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ the ``es``, ``es#``, ``et`` and ``et#`` formats.
3636

3737
However, when a :ctype:`Py_buffer` structure gets filled, the underlying
3838
buffer is locked so that the caller can subsequently use the buffer even
39-
inside a ``Py_BEGIN_ALLOW_THREADS`` block without the risk of mutable data
39+
inside a :ctype:`Py_BEGIN_ALLOW_THREADS` block without the risk of mutable data
4040
being resized or destroyed. As a result, **you have to call**
4141
:cfunc:`PyBuffer_Release` after you have finished processing the data (or
4242
in any early abort case).
@@ -48,9 +48,9 @@ Unless otherwise stated, buffers are not NUL-terminated.
4848
the length argument (int or :ctype:`Py_ssize_t`) is controlled by
4949
defining the macro :cmacro:`PY_SSIZE_T_CLEAN` before including
5050
:file:`Python.h`. If the macro was defined, length is a
51-
:ctype:`Py_ssize_t` rather than an int. This behavior will change
51+
:ctype:`Py_ssize_t` rather than an :ctype:`int`. This behavior will change
5252
in a future Python version to only support :ctype:`Py_ssize_t` and
53-
drop int support. It is best to always define :cmacro:`PY_SSIZE_T_CLEAN`.
53+
drop :ctype:`int` support. It is best to always define :cmacro:`PY_SSIZE_T_CLEAN`.
5454

5555

5656
``s`` (:class:`str`) [const char \*]
@@ -488,11 +488,11 @@ Building values
488488
strings a tad more readable.
489489

490490
``s`` (:class:`str` or ``None``) [char \*]
491-
Convert a null-terminated C string to a Python object using ``'utf-8'``
491+
Convert a null-terminated C string to a Python :class:`str` object using ``'utf-8'``
492492
encoding. If the C string pointer is *NULL*, ``None`` is used.
493493

494494
``s#`` (:class:`str` or ``None``) [char \*, int]
495-
Convert a C string and its length to a Python object using ``'utf-8'``
495+
Convert a C string and its length to a Python :class:`str` object using ``'utf-8'``
496496
encoding. If the C string pointer is *NULL*, the length is ignored and
497497
``None`` is returned.
498498

0 commit comments

Comments
 (0)