[retro-gtk] debug: Add retro_debug()
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [retro-gtk] debug: Add retro_debug()
- Date: Sat, 19 Dec 2020 08:15:56 +0000 (UTC)
commit 152c44d3dc2793e369a0c8ea7fe24a6d24b8f341
Author: Adrien Plazas <kekun plazas laposte net>
Date: Sat Dec 19 08:47:37 2020 +0100
debug: Add retro_debug()
This will simplify logging debug information.
shared/retro-debug-private.h | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/shared/retro-debug-private.h b/shared/retro-debug-private.h
index e70da9f..70ae804 100644
--- a/shared/retro-debug-private.h
+++ b/shared/retro-debug-private.h
@@ -12,4 +12,10 @@ G_BEGIN_DECLS
gboolean retro_is_debug (void);
+#define retro_debug(...) \
+ G_STMT_START { \
+ if (G_UNLIKELY (retro_is_debug ())) \
+ g_debug (__VA_ARGS__); \
+ } G_STMT_END
+
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]