]> granicus.if.org Git - python/commitdiff
Fix the test_weakref.py failure. Introduced by resolving "a conflict"
authorTim Peters <tim.peters@gmail.com>
Thu, 2 Aug 2001 04:45:20 +0000 (04:45 +0000)
committerTim Peters <tim.peters@gmail.com>
Thu, 2 Aug 2001 04:45:20 +0000 (04:45 +0000)
(which didn't actually exist!) incorrectly.

Objects/classobject.c

index c4b1d8e1f9b9f04875bd5c4736f0622380d631cd..4bad2fdb45c527e7d0bb3d23b67634a7b9f9c0fc 100644 (file)
@@ -193,13 +193,6 @@ class_getattr(register PyClassObject *op, PyObject *name)
                             PyString_AS_STRING(op->cl_name), sname);
                return NULL;
        }
-       Py_INCREF(v);
-       if (PyFunction_Check(v)) {
-               PyObject *w = PyMethod_New(v, (PyObject *)NULL,
-                                                   (PyObject *)class);
-               Py_DECREF(v);
-               v = w;
-       }
        f = v->ob_type->tp_descr_get;
        if (f == NULL)
                Py_INCREF(v);