mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Issue #1717, stage 2: remove uses of tp_compare in Modules and most
Objects.
This commit is contained in:
parent
776e7014e9
commit
211c625829
15 changed files with 385 additions and 113 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue