summaryrefslogtreecommitdiffstats
path: root/Modules/_sqlite
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-12-27 13:41:34 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-12-27 13:41:34 (GMT)
commit191321d11bc7e064e1a07830a43fa600de310e1b (patch)
tree083b269838ac1e7dbea54ead1a4b79e99dbf4891 /Modules/_sqlite
parent4a1e70fc31d224786a32f950edaf73c8ea9c194d (diff)
downloadcpython-191321d11bc7e064e1a07830a43fa600de310e1b.zip
cpython-191321d11bc7e064e1a07830a43fa600de310e1b.tar.gz
cpython-191321d11bc7e064e1a07830a43fa600de310e1b.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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_sqlite/cursor.c b/Modules/_sqlite/cursor.c
index d909738..c0c8746 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) {