]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Fix types in buffer/memoryview docs (GH-98118)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 10 Oct 2022 01:03:53 +0000 (18:03 -0700)
committerPablo Galindo <pablogsal@gmail.com>
Sat, 22 Oct 2022 19:04:49 +0000 (20:04 +0100)
commit979440e96f0eb434ae4e2df3913ee34e5c9feffd
tree0433c3f74439327bf6bd6ffd03885a568ae90f84
parent7b803ec34405f4fba5114d728df223bfd4db5b83
Fix types in buffer/memoryview docs (GH-98118)

The definition of obj in the `Py_buffer` struct is as a PyObject*
https://github.com/python/cpython/blob/ec091bd47e2f968b0d1631b9a8104283a7beeb1b/Include/pybuffer.hGH-L22

PyMemoryView_GET_BASE returns `.obj` - thus its return type
should be a PyObject* (or at least a void*). It definitely
doesn't return `Py_buffer`
(cherry picked from commit c459fedf7cfd5dadf72e088d789c7375b3a6e093)

Co-authored-by: da-woods <dw-git@d-woods.co.uk>
Doc/c-api/buffer.rst
Doc/c-api/memoryview.rst