diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-07-31 15:04:31 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-31 15:04:31 (GMT) |
commit | 29a3a33d99dae0106c6af9d0fd75a11bef26d15c (patch) | |
tree | e63da47122819af1d9ee95323d0d3df65798d0f0 /Doc | |
parent | d8b914a30b0849476345a19ce0a0ab1ade171b19 (diff) | |
download | cpython-29a3a33d99dae0106c6af9d0fd75a11bef26d15c.zip cpython-29a3a33d99dae0106c6af9d0fd75a11bef26d15c.tar.gz cpython-29a3a33d99dae0106c6af9d0fd75a11bef26d15c.tar.bz2 |
bpo-34101: Add doc of PyBuffer_GetPointer (GH-14994)
(cherry picked from commit 1b29af83bc17e773b0c0d117f5fe1018fde46b0d)
Co-authored-by: Hai Shi <shihai1992@gmail.com>
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/c-api/buffer.rst | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Doc/c-api/buffer.rst b/Doc/c-api/buffer.rst index 7553efc..fdb8bd1 100644 --- a/Doc/c-api/buffer.rst +++ b/Doc/c-api/buffer.rst @@ -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*. |