annotate src/audacious/debug.h @ 4595:d69b2bcea170

NO_PLAY_BUTTON and PLAY_BUTTON defines don't quite make sense
author Tomasz Mon <desowin@gmail.com>
date Fri, 30 May 2008 16:05:03 +0200
parents 2eee464379dc
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4557
2eee464379dc Clean up header multiple inclusion guards (e.g. #ifndef FOO_H/#define FOO_H)
Matti Hamalainen <ccr@tnsp.org>
parents: 2313
diff changeset
1 #ifndef AUDACIOUS_DEBUG_H
2eee464379dc Clean up header multiple inclusion guards (e.g. #ifndef FOO_H/#define FOO_H)
Matti Hamalainen <ccr@tnsp.org>
parents: 2313
diff changeset
2 #define AUDACIOUS_DEBUG_H
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
4 #include <glib.h>
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
5
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
6 #ifdef NDEBUG
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
7
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
8 /* void REQUIRE_LOCK(GMutex *m); */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
9 # define REQUIRE_LOCK(m)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
10
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
11 /* void REQUIRE_STR_UTF8(const gchar *str); */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
12 # define REQUIRE_STR_UTF8(str)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
13
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
14 /* void REQUIRE_STATIC_LOCK(GStaticMutex *m); */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
15 # define REQUIRE_STATIC_LOCK(m)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
16
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
17 #else /* !NDEBUG */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
18
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
19 /* void REQUIRE_LOCK(GMutex *m); */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
20 # define REQUIRE_LOCK(m) G_STMT_START { \
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
21 if (g_mutex_trylock(m)) { \
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
22 g_critical(G_STRLOC ": Mutex not locked!"); \
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
23 g_mutex_unlock(m); \
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
24 } \
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
25 } G_STMT_END
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
26
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
27 /* void REQUIRE_STATIC_LOCK(GStaticMutex *m); */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
28 # define REQUIRE_STATIC_LOCK(m) G_STMT_START { \
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
29 if (G_TRYLOCK(m)) { \
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
30 g_critical(G_STRLOC ": Mutex not locked!"); \
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
31 G_UNLOCK(m); \
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
32 } \
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
33 } G_STMT_END
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
34
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
35 /* void REQUIRE_STR_UTF8(const gchar *str); */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
36 # define REQUIRE_STR_UTF8(str) G_STMT_START { \
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
37 if (!g_utf_validate(str, -1, NULL)) \
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
38 g_warning(G_STRLOC ": String is not UTF-8!"); \
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
39 } G_STMT_END
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
40
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
41 #endif /* NDEBUG */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
42
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
43
4557
2eee464379dc Clean up header multiple inclusion guards (e.g. #ifndef FOO_H/#define FOO_H)
Matti Hamalainen <ccr@tnsp.org>
parents: 2313
diff changeset
44 #endif /* AUDACIOUS_DEBUG_H */