Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fff532b

Browse files
committed
Issue #8749: remove unused code in Objects/object.c. Thanks Yaniv Aknin.
1 parent 3fed087 commit fff532b

1 file changed

Lines changed: 0 additions & 24 deletions

File tree

Objects/object.c

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -950,31 +950,7 @@ PyObject_GenericGetAttr(PyObject *obj, PyObject *name)
950950
goto done;
951951
}
952952

953-
#if 0 /* XXX this is not quite _PyType_Lookup anymore */
954-
/* Inline _PyType_Lookup */
955-
{
956-
Py_ssize_t i, n;
957-
PyObject *mro, *base, *dict;
958-
959-
/* Look in tp_dict of types in MRO */
960-
mro = tp->tp_mro;
961-
assert(mro != NULL);
962-
assert(PyTuple_Check(mro));
963-
n = PyTuple_GET_SIZE(mro);
964-
for (i = 0; i < n; i++) {
965-
base = PyTuple_GET_ITEM(mro, i);
966-
assert(PyType_Check(base));
967-
dict = ((PyTypeObject *)base)->tp_dict;
968-
assert(dict && PyDict_Check(dict));
969-
descr = PyDict_GetItem(dict, name);
970-
if (descr != NULL)
971-
break;
972-
}
973-
}
974-
#else
975953
descr = _PyType_Lookup(tp, name);
976-
#endif
977-
978954
Py_XINCREF(descr);
979955

980956
f = NULL;

0 commit comments

Comments
 (0)