Mercurial > cpython-lru_cache-weakref
diff Objects/codeobject.c @ 39658:a5048c8d8f33
Fix a bunch of compiler warnings. In at least one case these were serious bugs!
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Thu, 24 Aug 2006 23:43:52 +0000 |
| parents | 69f61f90c4fc |
| children | 1cce0526d9b0 |
line wrap: on
line diff
--- a/Objects/codeobject.c Thu Aug 24 21:29:26 2006 +0000 +++ b/Objects/codeobject.c Thu Aug 24 23:43:52 2006 +0000 @@ -308,7 +308,7 @@ co = (PyCodeObject *)self; cp = (PyCodeObject *)other; - eq = PyObject_RichCompare(co->co_name, cp->co_name, Py_EQ); + eq = PyObject_RichCompareBool(co->co_name, cp->co_name, Py_EQ); if (eq <= 0) goto unequal; eq = co->co_argcount == cp->co_argcount; if (!eq) goto unequal; @@ -318,17 +318,17 @@ if (!eq) goto unequal; eq = co->co_firstlineno == cp->co_firstlineno; if (!eq) goto unequal; - eq = PyObject_RichCompare(co->co_code, cp->co_code, Py_EQ); + eq = PyObject_RichCompareBool(co->co_code, cp->co_code, Py_EQ); if (eq <= 0) goto unequal; - eq = PyObject_RichCompare(co->co_consts, cp->co_consts, Py_EQ); + eq = PyObject_RichCompareBool(co->co_consts, cp->co_consts, Py_EQ); if (eq <= 0) goto unequal; - eq = PyObject_RichCompare(co->co_names, cp->co_names, Py_EQ); + eq = PyObject_RichCompareBool(co->co_names, cp->co_names, Py_EQ); if (eq <= 0) goto unequal; - eq = PyObject_RichCompare(co->co_varnames, cp->co_varnames, Py_EQ); + eq = PyObject_RichCompareBool(co->co_varnames, cp->co_varnames, Py_EQ); if (eq <= 0) goto unequal; - eq = PyObject_RichCompare(co->co_freevars, cp->co_freevars, Py_EQ); + eq = PyObject_RichCompareBool(co->co_freevars, cp->co_freevars, Py_EQ); if (eq <= 0) goto unequal; - eq = PyObject_RichCompare(co->co_cellvars, cp->co_cellvars, Py_EQ); + eq = PyObject_RichCompareBool(co->co_cellvars, cp->co_cellvars, Py_EQ); if (eq <= 0) goto unequal; if (op == Py_EQ)
