diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c --- a/Modules/_sqlite/connection.c +++ b/Modules/_sqlite/connection.c @@ -197,36 +197,16 @@ int pysqlite_connection_init(pysqlite_Co self->IntegrityError = pysqlite_IntegrityError; self->InternalError = pysqlite_InternalError; self->ProgrammingError = pysqlite_ProgrammingError; self->NotSupportedError = pysqlite_NotSupportedError; return 0; } -/* Empty the entire statement cache of this connection */ -void pysqlite_flush_statement_cache(pysqlite_Connection* self) -{ - pysqlite_Node* node; - pysqlite_Statement* statement; - - node = self->statement_cache->first; - - while (node) { - statement = (pysqlite_Statement*)(node->data); - (void)pysqlite_statement_finalize(statement); - node = node->next; - } - - Py_SETREF(self->statement_cache, - (pysqlite_Cache *)PyObject_CallFunction((PyObject *)&pysqlite_CacheType, "O", self)); - Py_DECREF(self); - self->statement_cache->decref_factory = 0; -} - /* action in (ACTION_RESET, ACTION_FINALIZE) */ void pysqlite_do_all_statements(pysqlite_Connection* self, int action, int reset_cursors) { int i; PyObject* weakref; PyObject* statement; pysqlite_Cursor* cursor;