anjuta r4373 - in trunk: . libanjuta
- From: jrliggett svn gnome org
- To: svn-commits-list gnome org
- Subject: anjuta r4373 - in trunk: . libanjuta
- Date: Mon, 3 Nov 2008 09:03:26 +0000 (UTC)
Author: jrliggett
Date: Mon Nov 3 09:03:26 2008
New Revision: 4373
URL: http://svn.gnome.org/viewvc/anjuta?rev=4373&view=rev
Log:
* libanjuta/anjuta-debug.h:
Fixed some mistakes from revision 4366. Properly detect GCC.
Modify DEBUG_PRINT macro to use g_debug instead of g_message, and print the
file name, line number, and function that the macro was called from.
Implements changes discussed with Ignacio and Johannes.
Properly fixes bug #558788
Modified:
trunk/ChangeLog
trunk/libanjuta/anjuta-debug.h
Modified: trunk/libanjuta/anjuta-debug.h
==============================================================================
--- trunk/libanjuta/anjuta-debug.h (original)
+++ trunk/libanjuta/anjuta-debug.h Mon Nov 3 09:03:26 2008
@@ -35,10 +35,16 @@
* DEBUG_PRINT:
*
* Equivalent to g_debug() showing the FILE, the LINE and the FUNC,
- * except it has only effect when DEBUG is defined. Used for printing debug messages.
+ * except it has only effect when DEBUG is defined. Used for printing debug
+ * messages.
*/
-#if defined (DEBUG) && defined (__GNUCC__)
-# define DEBUG_PRINT(format, ...) g_debug ("%s:%d (%s)" format, __FILE__, __LINE__, G_STRFUNC, __VA_ARGS__)
+#if defined (DEBUG) && defined (__GNUC__) && __GNUC__ >= 3
+# define DEBUG_PRINT(...) do \
+ { \
+ g_debug ("%s:%d (%s)", __FILE__, __LINE__, \
+ G_STRFUNC); \
+ g_debug (__VA_ARGS__); \
+ } while (0)
#else
# define DEBUG_PRINT(...)
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]