Issue #26200: Added Py_SETREF and replaced Py_XSETREF with Py_SETREF

in places where Py_DECREF was used.
This commit is contained in:
Serhiy Storchaka 2016-04-10 18:12:01 +03:00
commit f01e408c16
23 changed files with 58 additions and 48 deletions

View file

@ -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;
}