]> err.no Git - mapper/commitdiff
Move DB_PREP macro
authorKaj-Michael Lang <milang@tal.org>
Tue, 18 Mar 2008 18:57:16 +0000 (20:57 +0200)
committerKaj-Michael Lang <milang@tal.org>
Tue, 18 Mar 2008 18:57:16 +0000 (20:57 +0200)
src/db.h
src/osm-db.c

index 99607afb3a2da742777a85f829bfe3df735a8670..a6e3f2c6beef0dfe51c6a1b43ea7a50d59d8e9e2 100644 (file)
--- a/src/db.h
+++ b/src/db.h
 #ifndef _MAPPER_DB_H
 #define _MAPPER_DB_H
 
+#define DB_PREP(db_,sql_,stmt_) \
+       if (sqlite3_prepare_v2(db_, sql_, -1, &stmt_, NULL)!=SQLITE_OK) { \
+               g_printerr("Failed to prepare: [%s] Error: %s", \
+                       sql_, sqlite3_errmsg(db_)); \
+               return FALSE; \
+       }
+
 sqlite3 *_db;
 gchar *_mapper_db;
 
index 5f21868b091b870b95b79cc2f8009cb031331fd3..bd9b7b66c15ff41f39321b97492ae17dfa3aafc7 100644 (file)
@@ -210,13 +210,6 @@ if (w!=NULL) {
 
 /*****************************************************************************/
 
-#define DB_PREP(db_,sql_,stmt_) \
-       if (sqlite3_prepare_v2(db_, sql_, -1, &stmt_, NULL)!=SQLITE_OK) { \
-               g_printerr("Failed to prepare: [%s] Error: %s", \
-                       sql_, sqlite3_errmsg(db_)); \
-               return FALSE; \
-       }
-
 gboolean
 osm_db_prepare(sqlite3 *db)
 {