gh-117764: Fix and add signatures for many builtins (GH-117769)

This commit is contained in:
Serhiy Storchaka 2024-04-12 13:56:41 +03:00 committed by GitHub
parent 94e9c35cd0
commit 3a8c1ca7e7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 45 additions and 30 deletions

View file

@ -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}
};