summaryrefslogtreecommitdiff
path: root/Modules/_sqlite/cursor.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-12-27 15:41:34 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2015-12-27 15:41:34 +0200
commit38f3c4611a7ed03dddc07fbd568b619af8b139a4 (patch)
tree6c7f540b5269ad3335a325f812fdc7793408827d /Modules/_sqlite/cursor.c
parent49b4fe42c04e1eec009aac77da7f44d985b1abbb (diff)
downloadcpython-38f3c4611a7ed03dddc07fbd568b619af8b139a4.tar.gz
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/cursor.c')
-rw-r--r--Modules/_sqlite/cursor.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_sqlite/cursor.c b/Modules/_sqlite/cursor.c
index d909738fd6..c0c8746837 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) {