Kaydet (Commit) a27a62e7 authored tarafından Christian Heimes's avatar Christian Heimes

Silenced a compiler warning in the sqlite module

Modules/_sqlite/row.c:187: warning: suggest parentheses around && within ||
Reviewed by Benjamin Peterson
üst 7d4c3177
...@@ -21,6 +21,8 @@ Core and Builtins ...@@ -21,6 +21,8 @@ Core and Builtins
Library Library
------- -------
- Silenced a trivial compiler warning in the sqlite module.
What's New in Python 2.6 beta 3? What's New in Python 2.6 beta 3?
================================ ================================
......
...@@ -183,8 +183,8 @@ static PyObject* pysqlite_row_richcompare(pysqlite_Row *self, PyObject *_other, ...@@ -183,8 +183,8 @@ static PyObject* pysqlite_row_richcompare(pysqlite_Row *self, PyObject *_other,
if (PyType_IsSubtype(Py_TYPE(_other), &pysqlite_RowType)) { if (PyType_IsSubtype(Py_TYPE(_other), &pysqlite_RowType)) {
pysqlite_Row *other = (pysqlite_Row *)_other; pysqlite_Row *other = (pysqlite_Row *)_other;
PyObject *res = PyObject_RichCompare(self->description, other->description, opid); PyObject *res = PyObject_RichCompare(self->description, other->description, opid);
if (opid == Py_EQ && res == Py_True if ((opid == Py_EQ && res == Py_True)
|| opid == Py_NE && res == Py_False) { || (opid == Py_NE && res == Py_False)) {
Py_DECREF(res); Py_DECREF(res);
return PyObject_RichCompare(self->data, other->data, opid); return PyObject_RichCompare(self->data, other->data, opid);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment