summaryrefslogtreecommitdiff
path: root/Objects/sliceobject.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-09-20 20:46:19 +0000
committerGuido van Rossum <guido@python.org>2001-09-20 20:46:19 +0000
commitfadc3568b2349da11025bc82a6573fe387a8c237 (patch)
tree94f30f54e9973755c433dc199f409c53993a7bc0 /Objects/sliceobject.c
parent63efa2fa5cc2bd4a440da8c0b1a7e0dff703d0c3 (diff)
downloadcpython-fadc3568b2349da11025bc82a6573fe387a8c237.tar.gz
Add optional docstrings to member descriptors. For backwards
compatibility, this required all places where an array of "struct memberlist" structures was declared that is referenced from a type's tp_members slot to change the type of the structure to PyMemberDef; "struct memberlist" is now only used by old code that still calls PyMember_Get/Set. The code in PyObject_GenericGetAttr/SetAttr now calls the new APIs PyMember_GetOne/SetOne, which take a PyMemberDef argument. As examples, I added actual docstrings to the attributes of a few types: file, complex, instance method, super, and xxsubtype.spamlist. Also converted the symtable to new style getattr.
Diffstat (limited to 'Objects/sliceobject.c')
-rw-r--r--Objects/sliceobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/sliceobject.c b/Objects/sliceobject.c
index 8f52f9ec17..81517a88c9 100644
--- a/Objects/sliceobject.c
+++ b/Objects/sliceobject.c
@@ -129,7 +129,7 @@ slice_repr(PySliceObject *r)
return s;
}
-static struct memberlist slice_members[] = {
+static PyMemberDef slice_members[] = {
{"start", T_OBJECT, offsetof(PySliceObject, start), READONLY},
{"stop", T_OBJECT, offsetof(PySliceObject, stop), READONLY},
{"step", T_OBJECT, offsetof(PySliceObject, step), READONLY},