File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ;
You can’t perform that action at this time.
0 commit comments