summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Krah <skrah@bytereef.org>2014-05-18 00:35:09 +0200
committerStefan Krah <skrah@bytereef.org>2014-05-18 00:35:09 +0200
commit7e9937e0049e8be220fafdaa208da77e65eccd9f (patch)
treef8f50507ff564134659d12af210c4cc5cfabc7be
parent9b7ae9f2e918ca6f004cebd31de1461548b5e01a (diff)
downloadcpython-7e9937e0049e8be220fafdaa208da77e65eccd9f.tar.gz
Issue #20186: memoryobject.c: add function signatures.
-rw-r--r--Objects/memoryobject.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/Objects/memoryobject.c b/Objects/memoryobject.c
index b0f287dc00..5148ce6bef 100644
--- a/Objects/memoryobject.c
+++ b/Objects/memoryobject.c
@@ -220,7 +220,7 @@ PyTypeObject _PyManagedBuffer_Type = {
PyDoc_STRVAR(memory_doc,
-"memoryview(object)\n\
+"memoryview($module, object)\n--\n\
\n\
Create a new memoryview object which references the given object.");
@@ -2897,6 +2897,7 @@ PyDoc_STRVAR(memory_f_contiguous_doc,
PyDoc_STRVAR(memory_contiguous_doc,
"A bool indicating whether the memory is contiguous.");
+
static PyGetSetDef memory_getsetlist[] = {
{"obj", (getter)memory_obj_get, NULL, memory_obj_doc},
{"nbytes", (getter)memory_nbytes_get, NULL, memory_nbytes_doc},
@@ -2914,19 +2915,19 @@ static PyGetSetDef memory_getsetlist[] = {
};
PyDoc_STRVAR(memory_release_doc,
-"M.release() -> None\n\
+"release($self, /)\n--\n\
\n\
Release the underlying buffer exposed by the memoryview object.");
PyDoc_STRVAR(memory_tobytes_doc,
-"M.tobytes() -> bytes\n\
+"tobytes($self, /)\n--\n\
\n\
Return the data in the buffer as a byte string.");
PyDoc_STRVAR(memory_tolist_doc,
-"M.tolist() -> list\n\
+"tolist($self, /)\n--\n\
\n\
Return the data in the buffer as a list of elements.");
PyDoc_STRVAR(memory_cast_doc,
-"M.cast(format[, shape]) -> memoryview\n\
+"cast($self, /, format, *, shape)\n--\n\
\n\
Cast a memoryview to a new format or shape.");