]> granicus.if.org Git - python/commitdiff
Issue #28036: Remove unused pysqlite_flush_statement_cache function
authorBerker Peksag <berker.peksag@gmail.com>
Sun, 11 Sep 2016 12:37:30 +0000 (15:37 +0300)
committerBerker Peksag <berker.peksag@gmail.com>
Sun, 11 Sep 2016 12:37:30 +0000 (15:37 +0300)
Modules/_sqlite/connection.c

index 4a10ce5ad5fd1f40fe349dc02db79e1f41091aca..aca66fed08edc7fa7a0e4ad63aa4e30eb7cab05d 100644 (file)
@@ -202,26 +202,6 @@ int pysqlite_connection_init(pysqlite_Connection* self, PyObject* args, PyObject
     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)
 {