From: Kaj-Michael Lang Date: Wed, 31 Oct 2007 07:12:00 +0000 (+0200) Subject: Add poi_deinit to finalize sql statements. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5bea9042defc2a4d9e925acaf01d790a1f6c182d;p=mapper Add poi_deinit to finalize sql statements. --- diff --git a/src/poi.c b/src/poi.c index 6374b46..8f61d61 100644 --- a/src/poi.c +++ b/src/poi.c @@ -294,6 +294,27 @@ poi_db_prepare(sqlite3 *db) return TRUE; } +void +poi_deinit(sqlite3 *db) +{ +sqlite3_finalize(poisql.select_quick_cat); +sqlite3_finalize(poisql.selall_cat); +sqlite3_finalize(poisql.toggle_cat); +sqlite3_finalize(poisql.delete_cat); +sqlite3_finalize(poisql.update_cat); +sqlite3_finalize(poisql.insert_cat); +sqlite3_finalize(poisql.select_cat); +sqlite3_finalize(poisql.insert_poi); +sqlite3_finalize(poisql.update_poi); +sqlite3_finalize(poisql.delete_poi); +sqlite3_finalize(poisql.delete_poi_by_catid); +sqlite3_finalize(poisql.nextlabel_poi); +sqlite3_finalize(poisql.select_nearest_poi); +sqlite3_finalize(poisql.select_poi); +sqlite3_finalize(poisql.select_poi_search); +sqlite3_finalize(poisql.select_poi_search_cat); +} + gboolean poi_init(sqlite3 **db) { diff --git a/src/poi.h b/src/poi.h index 09cb4f4..0eb49a1 100644 --- a/src/poi.h +++ b/src/poi.h @@ -82,6 +82,7 @@ struct sql_poi_stmt poisql; guint _poi_zoom; gboolean poi_init(sqlite3 **db); +void poi_deinit(sqlite3 *db); gboolean poi_db_create(sqlite3 *db); gboolean poi_db_prepare(sqlite3 *db);