diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-12-27 13:44:33 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-12-27 13:44:33 (GMT) |
commit | 726fc139a5f40d81a0013c856be1283da08de4a0 (patch) | |
tree | 7a7fe3b19e13842df5b5d45a8567fbfb5e7bbd75 /Modules/_sqlite | |
parent | bdb908ea5466bfa09869fd2e1e7f3b17fe0fb2ea (diff) | |
parent | 191321d11bc7e064e1a07830a43fa600de310e1b (diff) | |
download | cpython-726fc139a5f40d81a0013c856be1283da08de4a0.zip cpython-726fc139a5f40d81a0013c856be1283da08de4a0.tar.gz cpython-726fc139a5f40d81a0013c856be1283da08de4a0.tar.bz2 |
Issue #20440: More use of Py_SETREF.
This patch is manually crafted and contains changes that couldn't be handled
automatically.
Diffstat (limited to 'Modules/_sqlite')
-rw-r--r-- | Modules/_sqlite/cursor.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_sqlite/cursor.c b/Modules/_sqlite/cursor.c index 1c240d6..cdb91ee 100644 --- a/Modules/_sqlite/cursor.c +++ b/Modules/_sqlite/cursor.c @@ -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) { |