summaryrefslogtreecommitdiffstats
path: root/Objects/memoryobject.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2024-04-12 10:56:41 (GMT)
committerGitHub <noreply@github.com>2024-04-12 10:56:41 (GMT)
commit3a8c1ca7e7ce181ddb29c9393171d5c508ce89c8 (patch)
tree9503a1be17bd94635c29b1452afebb5bdb84dba5 /Objects/memoryobject.c
parent94e9c35cd0f2898693bb96eb1579fe0329648fa2 (diff)
downloadcpython-3a8c1ca7e7ce181ddb29c9393171d5c508ce89c8.zip
cpython-3a8c1ca7e7ce181ddb29c9393171d5c508ce89c8.tar.gz
cpython-3a8c1ca7e7ce181ddb29c9393171d5c508ce89c8.tar.bz2
gh-117764: Fix and add signatures for many builtins (GH-117769)
Diffstat (limited to 'Objects/memoryobject.c')
-rw-r--r--Objects/memoryobject.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Objects/memoryobject.c b/Objects/memoryobject.c
index 6a38952..5caa650 100644
--- a/Objects/memoryobject.c
+++ b/Objects/memoryobject.c
@@ -3255,6 +3255,9 @@ PyDoc_STRVAR(memory_f_contiguous_doc,
"A bool indicating whether the memory is Fortran contiguous.");
PyDoc_STRVAR(memory_contiguous_doc,
"A bool indicating whether the memory is contiguous.");
+PyDoc_STRVAR(memory_exit_doc,
+ "__exit__($self, /, *exc_info)\n--\n\n"
+ "Release the underlying buffer exposed by the memoryview object.");
static PyGetSetDef memory_getsetlist[] = {
@@ -3283,7 +3286,7 @@ static PyMethodDef memory_methods[] = {
MEMORYVIEW_TOREADONLY_METHODDEF
MEMORYVIEW__FROM_FLAGS_METHODDEF
{"__enter__", memory_enter, METH_NOARGS, NULL},
- {"__exit__", memory_exit, METH_VARARGS, NULL},
+ {"__exit__", memory_exit, METH_VARARGS, memory_exit_doc},
{NULL, NULL}
};