Skip to content

Commit

Permalink
Fix Py_buffer.format type and correct documentation typo
Browse files Browse the repository at this point in the history
This commit addresses the inconsistency between the Py_buffer.format declaration and its documentation as reported in issue python#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: python#119467
  • Loading branch information
adiaholic committed May 23, 2024
1 parent 6e012ce commit ab0f20f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Doc/c-api/buffer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,9 @@ a buffer, see :c:func:`PyObject_GetBuffer`.
or a :c:macro:`PyBUF_WRITABLE` request, the consumer must disregard
:c:member:`~Py_buffer.itemsize` and assume ``itemsize == 1``.

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

Expand Down

0 comments on commit ab0f20f

Please sign in to comment.