Skip to content

Commit 3de582d

Browse files
committed
gh-137696: update PyBuffer_FromContiguous documentation to include case when order is 'A'
1 parent 9173bf3 commit 3de582d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Doc/c-api/buffer.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,11 @@ Buffer-related functions
504504
.. c:function:: int PyBuffer_FromContiguous(const Py_buffer *view, const void *buf, Py_ssize_t len, char order)
505505
506506
Copy contiguous *len* bytes from *buf* to *view*.
507-
*order* can be ``'C'`` or ``'F'`` (for C-style or Fortran-style ordering).
507+
508+
If *order* is ``'C'``, the data is copied in C-style order.
509+
If *order* is ``'F'``, the data is copied in Fortran-style order.
510+
If *order* is ``'A'``, either style may be used, whichever is more efficient.
511+
508512
``0`` is returned on success, ``-1`` on error.
509513
510514

0 commit comments

Comments
 (0)