diff options
author | Nikita Sobolev <mail@sobolevn.me> | 2024-01-29 09:56:11 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-29 09:56:11 (GMT) |
commit | 97fb2480e4807a34b8197243ad57566ed7769e24 (patch) | |
tree | 991ade2213c1100905086afd63680b014733d74c | |
parent | 3b86891fd69093b60141300862f278614ba80613 (diff) | |
download | cpython-97fb2480e4807a34b8197243ad57566ed7769e24.zip cpython-97fb2480e4807a34b8197243ad57566ed7769e24.tar.gz cpython-97fb2480e4807a34b8197243ad57566ed7769e24.tar.bz2 |
gh-101100: Fix sphinx warnings in `Doc/c-api/memoryview.rst` (GH-114669)
-rw-r--r-- | Doc/c-api/memoryview.rst | 13 | ||||
-rw-r--r-- | Doc/tools/.nitignore | 1 |
2 files changed, 13 insertions, 1 deletions
diff --git a/Doc/c-api/memoryview.rst b/Doc/c-api/memoryview.rst index 2aa4331..f603803 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 8b6847e..b8b7c22 100644 --- a/Doc/tools/.nitignore +++ b/Doc/tools/.nitignore @@ -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/sys.rst |