[Python-3000-checkins] r51577 - python/branches/p3yk/Objects/codeobject.c python/branches/p3yk/Objects/listobject.c
guido.van.rossum
python-3000-checkins at python.org
Fri Aug 25 01:43:52 CEST 2006
Author: guido.van.rossum
Date: Fri Aug 25 01:43:52 2006
New Revision: 51577
Modified:
python/branches/p3yk/Objects/codeobject.c
python/branches/p3yk/Objects/listobject.c
Log:
Fix a bunch of compiler warnings. In at least one case these were serious bugs!
Modified: python/branches/p3yk/Objects/codeobject.c
==============================================================================
--- python/branches/p3yk/Objects/codeobject.c (original)
+++ python/branches/p3yk/Objects/codeobject.c Fri Aug 25 01:43:52 2006
@@ -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)
Modified: python/branches/p3yk/Objects/listobject.c
==============================================================================
--- python/branches/p3yk/Objects/listobject.c (original)
+++ python/branches/p3yk/Objects/listobject.c Fri Aug 25 01:43:52 2006
@@ -1979,7 +1979,7 @@
return 1;
if (!PyCFunction_Check(cmpfunc))
return 0;
- f = (PyCFunction *)cmpfunc;
+ f = (PyCFunctionObject *)cmpfunc;
if (f->m_self != NULL)
return 0;
if (!PyString_Check(f->m_module))
More information about the Python-3000-checkins
mailing list