Skip to content

Commit 4cab7eb

Browse files
miss-islingtonshihai1991
authored andcommitted
bpo-37750: Add doc of PyBuffer_FromContiguous (GH-15988) (GH-15990)
https://bugs.python.org/issue37750 Automerge-Triggered-By: @matrixise (cherry picked from commit 5a56ce4) Co-authored-by: Hai Shi <shihai1992@gmail.com>
1 parent 0b7f370 commit 4cab7eb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Doc/c-api/buffer.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,13 @@ Buffer-related functions
481481
*indices* must point to an array of ``view->ndim`` indices.
482482
483483
484+
.. c:function:: int PyBuffer_FromContiguous(Py_buffer *view, void *buf, Py_ssize_t len, char fort)
485+
486+
Copy contiguous *len* bytes from *buf* to *view*.
487+
*fort* can be ``'C'`` or ``'F'`` (for C-style or Fortran-style ordering).
488+
``0`` is returned on success, ``-1`` on error.
489+
490+
484491
.. c:function:: int PyBuffer_ToContiguous(void *buf, Py_buffer *src, Py_ssize_t len, char order)
485492
486493
Copy *len* bytes from *src* to its contiguous representation in *buf*.

0 commit comments

Comments
 (0)