[Python-checkins] r81470 - python/branches/py3k/Objects/object.c
mark.dickinson
python-checkins at python.org
Sat May 22 14:02:35 CEST 2010
Author: mark.dickinson
Date: Sat May 22 14:02:35 2010
New Revision: 81470
Log:
Issue #8749: remove unused code in Objects/object.c. Thanks Yaniv Aknin.
Modified:
python/branches/py3k/Objects/object.c
Modified: python/branches/py3k/Objects/object.c
==============================================================================
--- python/branches/py3k/Objects/object.c (original)
+++ python/branches/py3k/Objects/object.c Sat May 22 14:02:35 2010
@@ -950,31 +950,7 @@
goto done;
}
-#if 0 /* XXX this is not quite _PyType_Lookup anymore */
- /* Inline _PyType_Lookup */
- {
- Py_ssize_t i, n;
- PyObject *mro, *base, *dict;
-
- /* Look in tp_dict of types in MRO */
- mro = tp->tp_mro;
- assert(mro != NULL);
- assert(PyTuple_Check(mro));
- n = PyTuple_GET_SIZE(mro);
- for (i = 0; i < n; i++) {
- base = PyTuple_GET_ITEM(mro, i);
- assert(PyType_Check(base));
- dict = ((PyTypeObject *)base)->tp_dict;
- assert(dict && PyDict_Check(dict));
- descr = PyDict_GetItem(dict, name);
- if (descr != NULL)
- break;
- }
- }
-#else
descr = _PyType_Lookup(tp, name);
-#endif
-
Py_XINCREF(descr);
f = NULL;
More information about the Python-checkins
mailing list