diff --git a/Doc/c-api/arg.rst b/Doc/c-api/arg.rst index 834aae9372fe3b..6ae10f185182fb 100644 --- a/Doc/c-api/arg.rst +++ b/Doc/c-api/arg.rst @@ -163,7 +163,7 @@ There are three ways strings and buffers can be converted to C: The buffer may contain embedded null bytes. The caller have to call :c:func:`PyBuffer_Release` when it is done with the buffer. -``es`` (:class:`str`) [const char \*encoding, char \*\*buffer] +``es`` (:class:`str`) [*encoding*, char \*buffer] This variant on ``s`` is used for encoding Unicode into a character buffer. It only works for encoded data without embedded NUL bytes. @@ -180,12 +180,12 @@ There are three ways strings and buffers can be converted to C: allocated storage. The caller is responsible for calling :c:func:`PyMem_Free` to free the allocated buffer after use. -``et`` (:class:`str`, :class:`bytes` or :class:`bytearray`) [const char \*encoding, char \*\*buffer] +``et`` (:class:`str`, :class:`bytes` or :class:`bytearray`) [*encoding*, char \*buffer] Same as ``es`` except that byte string objects are passed through without recoding them. Instead, the implementation assumes that the byte string object uses the encoding passed in as parameter. -``es#`` (:class:`str`) [const char \*encoding, char \*\*buffer, :c:type:`Py_ssize_t` \*buffer_length] +``es#`` (:class:`str`) [*encoding*, char \*buffer, :c:type:`Py_ssize_t` buffer_length] This variant on ``s#`` is used for encoding Unicode into a character buffer. Unlike the ``es`` format, this variant allows input data which contains NUL characters. @@ -216,7 +216,7 @@ There are three ways strings and buffers can be converted to C: In both cases, *\*buffer_length* is set to the length of the encoded data without the trailing NUL byte. -``et#`` (:class:`str`, :class:`bytes` or :class:`bytearray`) [const char \*encoding, char \*\*buffer, :c:type:`Py_ssize_t` \*buffer_length] +``et#`` (:class:`str`, :class:`bytes` or :class:`bytearray`) [*encoding*, char \*buffer, :c:type:`Py_ssize_t` buffer_length] Same as ``es#`` except that byte string objects are passed through without recoding them. Instead, the implementation assumes that the byte string object uses the encoding passed in as parameter.