8000 Fix Py_buffer.format type and correct documentation typo · python/cpython@1facf3a · GitHub
[go: up one dir, main page]

Skip to content

Commit 1facf3a

Browse files
committed
Fix Py_buffer.format type and correct documentation typo
This commit addresses the inconsistency between the Py_buffer.format declaration and its documentation as reported in issue #119467. The documentation previously stated `const char *` for the format field, which has been corrected to `char *` to match the actual code declaration. Additionally, a spelling mistake in the documentation has been corrected to enhance clarity and accuracy. References: - Issue: #119467
1 parent e94dbe4 commit 1facf3a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doc/c-api/buffer.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ a buffer, see :c:func:`PyObject_GetBuffer`.
147147
or a :c:macro:`PyBUF_WRITABLE` request, the consumer must disregard
148148
:c:member:`~Py_buffer.itemsize` and assume ``itemsize == 1``.
149149

150-
.. c:member:: const char *format
150+
.. c:member:: char *format
151151
152-
A *NUL* terminated string in :mod:`struct` module style syntax describing
152+
A *NULL* terminated string in :mod:`struct` module style syntax describing
153153
the contents of a single item. If this is ``NULL``, ``"B"`` (unsigned bytes)
154154
is assumed.
155155

0 commit comments

Comments
 (0)
0