Build break and fix it better.
authorSrinivasa Ragavan <sragavan@novell.com>
Wed, 13 Aug 2008 18:39:28 +0000 (18:39 +0000)
committerSrinivasa Ragavan <sragavan@src.gnome.org>
Wed, 13 Aug 2008 18:39:28 +0000 (18:39 +0000)
2008-08-14  Srinivasa Ragavan  <sragavan@novell.com>

* camel/camel-db.c: Build break and fix it better.

svn path=/trunk/; revision=9341

camel/ChangeLog
camel/camel-db.c

index 1c3861f..1db53af 100644 (file)
@@ -1,3 +1,7 @@
+2008-08-14  Srinivasa Ragavan  <sragavan@novell.com>
+
+       * camel/camel-db.c: Build break and fix it better.
+
 2008-08-13  Srinivasa Ragavan  <sragavan@novell.com>
 
        * camel/camel-vtrash-folder.c: Revert junk/trash. It slows down. Needs
index e116de1..fa3330f 100644 (file)
 #include <glib/gi18n-lib.h>
 
 #if CAMEL_DB_DEBUG
-#define d(x) x
-const int MONITOR_DB_PERFORMANCE = 1;
+/* Enable d(x) if you want */
+#define d(x) 
+/* Yeah it leaks, so fix it while debugging */
+#define START(stmt)    g_print ("\n===========\nDB SQL operation [%s] started\n", stmt); cdb->timer = g_timer_new ();
+#define END    g_timer_stop (cdb->timer); g_print ("DB Operation ended. Time Taken : %f\n###########\n", g_timer_elapsed (cdb->timer, NULL));
 #else
 #define d(x) 
-const int MONITOR_DB_PERFORMANCE = 0;
+#define START(x)
+#define END
 #endif
 
-#define START(stmt)    if (MONITOR_DB_PERFORMANCE) { g_print ("\n===========\nDB SQL operation [%s] started\n", stmt); cdb->timer = g_timer_new (); }
-#define END    if (MONITOR_DB_PERFORMANCE) {g_timer_stop (cdb->timer); g_print ("DB Operation ended. Time Taken : %f\n###########\n", g_timer_elapsed (cdb->timer, NULL)); }
 
 /* Having this as a global variable, without mutex protection is wrong. 
 This will cause unnecessary crashes and multiple people using the resource etc.