]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-101100: Fix sphinx warnings in `Doc/c-api/memoryview.rst` (GH-114669) ...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 29 Jan 2024 10:02:52 +0000 (11:02 +0100)
committerGitHub <noreply@github.com>
Mon, 29 Jan 2024 10:02:52 +0000 (10:02 +0000)
(cherry picked from commit 97fb2480e4807a34b8197243ad57566ed7769e24)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Doc/c-api/memoryview.rst
Doc/tools/.nitignore

index 2aa43318e7a455c19794887400d4519dac457b0b..f6038032805259f929fb56d95a33473e1abb7db6 100644 (file)
@@ -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)
 
index 3248f32847987187f9921d35dd33205079dc405d..76fbc3c3d4d71ffa8c3e9059cc6c881fda345e3b 100644 (file)
@@ -9,7 +9,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/stable.rst
 Doc/c-api/structures.rst