summaryrefslogtreecommitdiff
path: root/numpy/lib/src/_compiled_base.c
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-01-05 10:28:41 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-01-05 10:28:41 +0000
commit8b1e2f929fdfb79e0a446a1fb7bec33a799d492b (patch)
tree588d1fb59f52798ef54a98dbe5ef20210dd16eae /numpy/lib/src/_compiled_base.c
parentb97663c8b33bbce12926887bf6ddac68fbadb42d (diff)
downloadnumpy-8b1e2f929fdfb79e0a446a1fb7bec33a799d492b.tar.gz
Add a few more docstrings using add_docstring.
Diffstat (limited to 'numpy/lib/src/_compiled_base.c')
-rw-r--r--numpy/lib/src/_compiled_base.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/numpy/lib/src/_compiled_base.c b/numpy/lib/src/_compiled_base.c
index 063631c7e..e54c3c6d8 100644
--- a/numpy/lib/src/_compiled_base.c
+++ b/numpy/lib/src/_compiled_base.c
@@ -339,6 +339,7 @@ arr_insert(PyObject *self, PyObject *args, PyObject *kwdict)
static PyTypeObject *PyMemberDescr_TypePtr=NULL;
static PyTypeObject *PyGetSetDescr_TypePtr=NULL;
+static PyTypeObject *PyMethodDescr_TypePtr=NULL;
/* Can only be called if doc is currently NULL
*/
@@ -377,6 +378,9 @@ arr_add_docstring(PyObject *dummy, PyObject *args)
_ADDDOC(MemberDescr, new->d_member->doc, new->d_member->name)
else if _TESTDOC2(GetSetDescr)
_ADDDOC(GetSetDescr, new->d_getset->doc, new->d_getset->name)
+ else if _TESTDOC2(MethodDescr)
+ _ADDDOC(MethodDescr, new->d_method->ml_doc,
+ new->d_method->ml_name)
else {
PyErr_SetString(PyExc_TypeError,
"Cannot set a docstring for that object");
@@ -418,6 +422,9 @@ define_types(void)
myobj = PyDict_GetItemString(tp_dict, "alignment");
if (myobj == NULL) return;
PyMemberDescr_TypePtr = myobj->ob_type;
+ myobj = PyDict_GetItemString(tp_dict, "newbyteorder");
+ if (myobj == NULL) return;
+ PyMethodDescr_TypePtr = myobj->ob_type;
return;
}