mirror of
https://github.com/python/cpython.git
synced 2024-11-29 21:05:33 +08:00
Fix the test_weakref.py failure. Introduced by resolving "a conflict"
(which didn't actually exist!) incorrectly.
This commit is contained in:
parent
6d6c1a35e0
commit
5962cbf5ba
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user