Skip to content

Commit 420cd1a

Browse files
committed
gh-137696: update PyBuffer_FromContiguous documentation to include case when order is 'A'
1 parent 4d9135e commit 420cd1a

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
@@ -508,7 +508,11 @@ Buffer-related functions
508508
.. c:function:: int PyBuffer_FromContiguous(const Py_buffer *view, const void *buf, Py_ssize_t len, char order)
509509
510510
Copy contiguous *len* bytes from *buf* to *view*.
511-
*order* can be ``'C'`` or ``'F'`` (for C-style or Fortran-style ordering).
511+
512+
If *order* is ``'C'``, the data is copied in C-style order.
513+
If *order* is ``'F'``, the data is copied in Fortran-style order.
514+
If *order* is ``'A'``, either style may be used, whichever is more efficient.
515+
512516
``0`` is returned on success, ``-1`` on error.
513517
514518

0 commit comments

Comments
 (0)