Issue #20440: More use of Py_SETREF.

This patch is manually crafted and contains changes that couldn't be handled
automatically.
This commit is contained in:
Serhiy Storchaka 2015-12-27 15:44:33 +02:00
commit 726fc139a5
8 changed files with 40 additions and 63 deletions

View file

@ -524,10 +524,10 @@ PyObject* _pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject*
if (self->statement) {
(void)pysqlite_statement_reset(self->statement);
Py_DECREF(self->statement);
}
self->statement = (pysqlite_Statement*)pysqlite_cache_get(self->connection->statement_cache, func_args);
Py_SETREF(self->statement,
(pysqlite_Statement *)pysqlite_cache_get(self->connection->statement_cache, func_args));
Py_DECREF(func_args);
if (!self->statement) {