8000 gh-123609: Clarify usage of standalone `PyBUF_FORMAT` by ZeroIntensity · Pull Request #123778 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update buffer.rst
Co-authored-by: Petr Viktorin <encukou@gmail.com>
  • Loading branch information
ZeroIntensity and encukou authored Sep 9, 2024
commit beee9850dfb4e637535d97f8da720ea382862d94
6 changes: 3 additions & 3 deletions Doc/c-api/buffer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,9 @@ readonly, format
Since :c:macro:`PyBUF_SIMPLE` is defined as 0, :c:macro:`PyBUF_WRITABLE`
can be used as a stand-alone flag to request a simple writable buffer.

:c:macro:`PyBUF_FORMAT` can be \|'d to any of the flags except :c:macro:`PyBUF_SIMPLE`, because
the latter already implies format ``B`` (unsigned bytes). Likewise, :c:macro:`!PyBUF_FORMAT` cannot be
used on it's own: it must be \|'d to another flag.
:c:macro:`PyBUF_FORMAT` must be \|'d to any of the flags except :c:macro:`PyBUF_SIMPLE`, because
the latter already implies format ``B`` (unsigned bytes). :c:macro:`!PyBUF_FORMAT` cannot be
used on its own.


shape, strides, suboffsets
Expand Down
0