[3.12] gh-101100: Fix sphinx warnings in `Doc/c-api/memoryview.rst` (GH-114669) (GH-114704)
![](https://secure.gravatar.com/avatar/cc7737cd64a84f1b5c61a160798e97ee.jpg?s=120&d=mm&r=g)
https://github.com/python/cpython/commit/930f805e72587655cd4c2a7c0f28125bde2... commit: 930f805e72587655cd4c2a7c0f28125bde234914 branch: 3.12 author: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> committer: serhiy-storchaka <storchaka@gmail.com> date: 2024-01-29T10:02:06Z summary: [3.12] gh-101100: Fix sphinx warnings in `Doc/c-api/memoryview.rst` (GH-114669) (GH-114704) (cherry picked from commit 97fb2480e4807a34b8197243ad57566ed7769e24) Co-authored-by: Nikita Sobolev <mail@sobolevn.me> files: M Doc/c-api/memoryview.rst M Doc/tools/.nitignore diff --git a/Doc/c-api/memoryview.rst b/Doc/c-api/memoryview.rst index 2aa43318e7a455..f6038032805259 100644 --- a/Doc/c-api/memoryview.rst +++ b/Doc/c-api/memoryview.rst @@ -20,6 +20,17 @@ any other object. read/write, otherwise it may be either read-only or read/write at the discretion of the exporter. + +.. c:macro:: PyBUF_READ + + Flag to request a readonly buffer. + + +.. c:macro:: PyBUF_WRITE + + Flag to request a writable buffer. + + .. c:function:: PyObject *PyMemoryView_FromMemory(char *mem, Py_ssize_t size, int flags) Create a memoryview object using *mem* as the underlying buffer. @@ -41,6 +52,8 @@ any other object. original memory. Otherwise, a copy is made and the memoryview points to a new bytes object. + *buffertype* can be one of :c:macro:`PyBUF_READ` or :c:macro:`PyBUF_WRITE`. + .. c:function:: int PyMemoryView_Check(PyObject *obj) diff --git a/Doc/tools/.nitignore b/Doc/tools/.nitignore index 89721e405ee770..9edbdf18d9a24a 100644 --- a/Doc/tools/.nitignore +++ b/Doc/tools/.nitignore @@ -11,7 +11,6 @@ Doc/c-api/gcsupport.rst Doc/c-api/init.rst Doc/c-api/init_config.rst Doc/c-api/intro.rst -Doc/c-api/memoryview.rst Doc/c-api/module.rst Doc/c-api/object.rst Doc/c-api/stable.rst
participants (1)
-
serhiy-storchaka