summaryrefslogtreecommitdiffstats
path: root/Modules/_sqlite
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-04-10 15:12:01 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-04-10 15:12:01 (GMT)
commitf01e408c1688a207eba18444da8c151c872fba59 (patch)
tree3330812d856579add4526f10d5284164a15b6037 /Modules/_sqlite
parent47c5474aa0cbe8dc3cf2c370b19769edd3f2e8d8 (diff)
parent57a01d3a0ee20ee9eea69b658c6bac0f39541625 (diff)
downloadcpython-f01e408c1688a207eba18444da8c151c872fba59.zip
cpython-f01e408c1688a207eba18444da8c151c872fba59.tar.gz
cpython-f01e408c1688a207eba18444da8c151c872fba59.tar.bz2
Issue #26200: Added Py_SETREF and replaced Py_XSETREF with Py_SETREF
in places where Py_DECREF was used.
Diffstat (limited to 'Modules/_sqlite')
-rw-r--r--Modules/_sqlite/connection.c6
-rw-r--r--Modules/_sqlite/cursor.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c
index f634877..4beed78 100644
--- a/Modules/_sqlite/connection.c
+++ b/Modules/_sqlite/connection.c
@@ -204,7 +204,7 @@ void pysqlite_flush_statement_cache(pysqlite_Connection* self)
node = node->next;
}
- Py_XSETREF(self->statement_cache,
+ Py_SETREF(self->statement_cache,
(pysqlite_Cache *)PyObject_CallFunction((PyObject *)&pysqlite_CacheType, "O", self));
Py_DECREF(self);
self->statement_cache->decref_factory = 0;
@@ -793,7 +793,7 @@ static void _pysqlite_drop_unused_statement_references(pysqlite_Connection* self
}
}
- Py_XSETREF(self->statements, new_list);
+ Py_SETREF(self->statements, new_list);
}
static void _pysqlite_drop_unused_cursor_references(pysqlite_Connection* self)
@@ -824,7 +824,7 @@ static void _pysqlite_drop_unused_cursor_references(pysqlite_Connection* self)
}
}
- Py_XSETREF(self->cursors, new_list);
+ Py_SETREF(self->cursors, new_list);
}
PyObject* pysqlite_connection_create_function(pysqlite_Connection* self, PyObject* args, PyObject* kwargs)
diff --git a/Modules/_sqlite/cursor.c b/Modules/_sqlite/cursor.c
index 552c8bb..23f3057 100644
--- a/Modules/_sqlite/cursor.c
+++ b/Modules/_sqlite/cursor.c
@@ -509,7 +509,7 @@ PyObject* _pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject*
/* reset description and rowcount */
Py_INCREF(Py_None);
- Py_XSETREF(self->description, Py_None);
+ Py_SETREF(self->description, Py_None);
self->rowcount = -1L;
func_args = PyTuple_New(1);
@@ -534,7 +534,7 @@ PyObject* _pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject*
}
if (self->statement->in_use) {
- Py_XSETREF(self->statement,
+ Py_SETREF(self->statement,
PyObject_New(pysqlite_Statement, &pysqlite_StatementType));
if (!self->statement) {
goto error;
@@ -651,7 +651,7 @@ PyObject* _pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject*
numcols = sqlite3_column_count(self->statement->st);
Py_END_ALLOW_THREADS
- Py_XSETREF(self->description, PyTuple_New(numcols));
+ Py_SETREF(self->description, PyTuple_New(numcols));
if (!self->description) {
goto error;
}