summaryrefslogtreecommitdiff
path: root/Objects
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2007-08-11 06:39:53 +0000
committerNeal Norwitz <nnorwitz@gmail.com>2007-08-11 06:39:53 +0000
commit8dfc4a9baca7b039048b6e1dab3e4eb09f7af463 (patch)
treec755a631b7c3736811c173469a63d570124fe0d4 /Objects
parent32ca442b13ecbd50e9b4a55b97ca12061ef13b5f (diff)
downloadcpython-git-8dfc4a9baca7b039048b6e1dab3e4eb09f7af463.tar.gz
Remove support for __members__ and __methods__. There still might be
some cleanup to do on this. Particularly in Python/traceback.c with getting rid of the getattr if possible and Demo/*metaclasses/Enum.py.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/methodobject.c35
1 files changed, 0 insertions, 35 deletions
diff --git a/Objects/methodobject.c b/Objects/methodobject.c
index f47037bbf3..5f5d595cad 100644
--- a/Objects/methodobject.c
+++ b/Objects/methodobject.c
@@ -275,47 +275,12 @@ PyTypeObject PyCFunction_Type = {
0, /* tp_dict */
};
-/* List all methods in a chain -- helper for findmethodinchain */
-
-static PyObject *
-listmethodchain(PyMethodChain *chain)
-{
- PyMethodChain *c;
- PyMethodDef *ml;
- int i, n;
- PyObject *v;
-
- n = 0;
- for (c = chain; c != NULL; c = c->link) {
- for (ml = c->methods; ml->ml_name != NULL; ml++)
- n++;
- }
- v = PyList_New(n);
- if (v == NULL)
- return NULL;
- i = 0;
- for (c = chain; c != NULL; c = c->link) {
- for (ml = c->methods; ml->ml_name != NULL; ml++) {
- PyList_SetItem(v, i, PyUnicode_FromString(ml->ml_name));
- i++;
- }
- }
- if (PyErr_Occurred()) {
- Py_DECREF(v);
- return NULL;
- }
- PyList_Sort(v);
- return v;
-}
-
/* Find a method in a method chain */
PyObject *
Py_FindMethodInChain(PyMethodChain *chain, PyObject *self, const char *name)
{
if (name[0] == '_' && name[1] == '_') {
- if (strcmp(name, "__methods__") == 0)
- return listmethodchain(chain);
if (strcmp(name, "__doc__") == 0) {
const char *doc = self->ob_type->tp_doc;
if (doc != NULL)