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

@ -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)