diff options
| author | Gerhard Häring <gh@ghaering.de> | 2010-03-05 09:12:37 (GMT) |
|---|---|---|
| committer | Gerhard Häring <gh@ghaering.de> | 2010-03-05 09:12:37 (GMT) |
| commit | 3bbb67273a8c146a38de91080a37e716e2699622 (patch) | |
| tree | 19a3d1e79cb51cc42760af73724c4f4615d4c21c /Modules/_sqlite/row.c | |
| parent | 2bb66e03b72ae5a0468dab0b7020316f31c8cfdf (diff) | |
| download | cpython-3bbb67273a8c146a38de91080a37e716e2699622.zip cpython-3bbb67273a8c146a38de91080a37e716e2699622.tar.gz cpython-3bbb67273a8c146a38de91080a37e716e2699622.tar.bz2 | |
Merged code from pysqlite 2.6.0.
Diffstat (limited to 'Modules/_sqlite/row.c')
| -rw-r--r-- | Modules/_sqlite/row.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Modules/_sqlite/row.c b/Modules/_sqlite/row.c index f1e1c43..480b482 100644 --- a/Modules/_sqlite/row.c +++ b/Modules/_sqlite/row.c @@ -1,6 +1,6 @@ /* row.c - an enhanced tuple for database rows * - * Copyright (C) 2005-2006 Gerhard Häring <gh@ghaering.de> + * Copyright (C) 2005-2010 Gerhard Häring <gh@ghaering.de> * * This file is part of pysqlite. * @@ -177,17 +177,17 @@ static long pysqlite_row_hash(pysqlite_Row *self) static PyObject* pysqlite_row_richcompare(pysqlite_Row *self, PyObject *_other, int opid) { if (opid != Py_EQ && opid != Py_NE) { - Py_INCREF(Py_NotImplemented); - return Py_NotImplemented; + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; } 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)) { - Py_DECREF(res); - return PyObject_RichCompare(self->data, other->data, opid); - } + 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)) { + Py_DECREF(res); + return PyObject_RichCompare(self->data, other->data, opid); + } } Py_INCREF(Py_NotImplemented); return Py_NotImplemented; |
