Issue #1717, stage 2: remove uses of tp_compare in Modules and most

Objects.
This commit is contained in:
Mark Dickinson 2009-02-01 10:28:51 +00:00
parent 776e7014e9
commit 211c625829
15 changed files with 385 additions and 113 deletions

View file

@ -715,7 +715,7 @@ whichmodule(PyObject *global, PyObject *global_name)
i = 0;
module_name = NULL;
while ((j = PyDict_Next(modules_dict, &i, &module_name, &module))) {
if (PyObject_Compare(module_name, main_str) == 0)
if (PyObject_RichCompareBool(module_name, main_str, Py_EQ) == 1)
continue;
obj = PyObject_GetAttr(module, global_name);