bpo-34101: Add doc of PyBuffer_GetPointer (GH-14994)

(cherry picked from commit 1b29af83bc)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
This commit is contained in:
Miss Islington (bot) 2019-07-31 08:04:31 -07:00 committed by GitHub
parent d8b914a30b
commit 29a3a33d99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -475,6 +475,12 @@ Buffer-related functions
(*order* is ``'A'``). Return ``0`` otherwise. This function always succeeds.
.. c:function:: void* PyBuffer_GetPointer(Py_buffer *view, Py_ssize_t *indices)
Get the memory area pointed to by the *indices* inside the given *view*.
*indices* must point to an array of ``view->ndim`` indices.
.. c:function:: int PyBuffer_ToContiguous(void *buf, Py_buffer *src, Py_ssize_t len, char order)
Copy *len* bytes from *src* to its contiguous representation in *buf*.