From e1a0d11c5cceeb71b22f3e3148f8f7d6bc0b4d8f Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Tue, 23 Oct 2007 19:24:22 +0000 Subject: #1316: remove redundant PyLong_Check calls when PyInt_Check was already called. --- Modules/_sqlite/row.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'Modules/_sqlite/row.c') diff --git a/Modules/_sqlite/row.c b/Modules/_sqlite/row.c index b2f105a9c4..2f3ba69f10 100644 --- a/Modules/_sqlite/row.c +++ b/Modules/_sqlite/row.c @@ -76,12 +76,7 @@ PyObject* pysqlite_row_subscript(pysqlite_Row* self, PyObject* idx) PyObject* item; - if (PyInt_Check(idx)) { - _idx = PyInt_AsLong(idx); - item = PyTuple_GetItem(self->data, _idx); - Py_XINCREF(item); - return item; - } else if (PyLong_Check(idx)) { + if (PyLong_Check(idx)) { _idx = PyLong_AsLong(idx); item = PyTuple_GetItem(self->data, _idx); Py_XINCREF(item); -- cgit v1.2.1