Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added docstring using array_doc variable form PyDoc_STRVAR()
  • Loading branch information
Geekverma authored Aug 8, 2023
commit 89537833b4295c11024bb93813552f46216be584
18 changes: 10 additions & 8 deletions Modules/_ctypes/_ctypes.c
Original file line number Diff line number Diff line change
Expand Up @@ -4795,6 +4795,14 @@ static PyMappingMethods Array_as_mapping = {
Array_ass_subscript,
};

PyDoc_STRVAR(array_doc,
"Abstract base class for arrays.\n"
"\n"
"The recommended way to create \n"
"concrete array types is by multiplying \n"
"any ctypes data type with a non-negative \n"
"integer.\n");

PyTypeObject PyCArray_Type = {
PyVarObject_HEAD_INIT(NULL, 0)
"_ctypes.Array",
Expand All @@ -4815,14 +4823,8 @@ PyTypeObject PyCArray_Type = {
0, /* tp_getattro */
0, /* tp_setattro */
&PyCData_as_buffer, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
PyDoc_STRVAR(array_doc,
"Abstract base class for arrays.\n"
"\n"
"The recommended way to create \n"
"concrete array types is by multiplying \n"
"any ctypes data type with a non-negative \n"
"integer.\n"), /* tp_doc */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
array_doc, /* tp_doc */
(traverseproc)PyCData_traverse, /* tp_traverse */
(inquiry)PyCData_clear, /* tp_clear */
0, /* tp_richcompare */
Expand Down