Skip to content

Commit 5a56ce4

Browse files
shihai1991miss-islington
authored andcommitted
bpo-37750: Add doc of PyBuffer_FromContiguous (GH-15988)
https://bugs.python.org/issue37750 Automerge-Triggered-By: @matrixise
1 parent 0b72ccf commit 5a56ce4

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
@@ -483,6 +483,13 @@ Buffer-related functions
483483
*indices* must point to an array of ``view->ndim`` indices.
484484
485485
486+
.. c:function:: int PyBuffer_FromContiguous(Py_buffer *view, void *buf, Py_ssize_t len, char fort)
487+
488+
Copy contiguous *len* bytes from *buf* to *view*.
489+
*fort* can be ``'C'`` or ``'F'`` (for C-style or Fortran-style ordering).
490+
``0`` is returned on success, ``-1`` on error.
491+
492+
486493
.. c:function:: int PyBuffer_ToContiguous(void *buf, Py_buffer *src, Py_ssize_t len, char order)
487494
488495
Copy *len* bytes from *src* to its contiguous representation in *buf*.

0 commit comments

Comments
 (0)