[Python-checkins] r65978 - in python/trunk: Misc/NEWS Modules/_sqlite/row.c

christian.heimes python-checkins at python.org
Fri Aug 22 21:55:55 CEST 2008


Author: christian.heimes
Date: Fri Aug 22 21:55:54 2008
New Revision: 65978

Log:
Silenced a compiler warning in the sqlite module
Modules/_sqlite/row.c:187: warning: suggest parentheses around && within ||
Reviewed by Benjamin Peterson

Modified:
   python/trunk/Misc/NEWS
   python/trunk/Modules/_sqlite/row.c

Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS	(original)
+++ python/trunk/Misc/NEWS	Fri Aug 22 21:55:54 2008
@@ -21,6 +21,8 @@
 Library
 -------
 
+- Silenced a trivial compiler warning in the sqlite module.
+
 
 What's New in Python 2.6 beta 3?
 ================================

Modified: python/trunk/Modules/_sqlite/row.c
==============================================================================
--- python/trunk/Modules/_sqlite/row.c	(original)
+++ python/trunk/Modules/_sqlite/row.c	Fri Aug 22 21:55:54 2008
@@ -183,8 +183,8 @@
     if (PyType_IsSubtype(Py_TYPE(_other), &pysqlite_RowType)) {
 	pysqlite_Row *other = (pysqlite_Row *)_other;
 	PyObject *res = PyObject_RichCompare(self->description, other->description, opid);
-	if (opid == Py_EQ && res == Py_True
-	    || opid == Py_NE && res == Py_False) {
+	if ((opid == Py_EQ && res == Py_True)
+	    || (opid == Py_NE && res == Py_False)) {
 	    Py_DECREF(res);
 	    return PyObject_RichCompare(self->data, other->data, opid);
 	}


More information about the Python-checkins mailing list