gdk: Avoid a pointless indirection
authorMatthias Clasen <mclasen@redhat.com>
Tue, 28 Mar 2023 01:56:41 +0000 (21:56 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 1 Apr 2023 00:23:42 +0000 (20:23 -0400)
Don't use g_fprintf if GLib is using system printf
anyway.

gdk/gdkdebugprivate.h

index c9baba28a78e8caa05708c3070100a7e06f191aa..dab4d890d2039366546c1d4b579115a4ed8c68da 100644 (file)
@@ -60,7 +60,11 @@ GdkDebugFlags    gdk_display_get_debug_flags    (GdkDisplay       *display);
 void             gdk_display_set_debug_flags    (GdkDisplay       *display,
                                                  GdkDebugFlags     flags);
 
+#ifdef GLIB_USING_SYSTEM_PRINTF
+#define gdk_debug_message(format, ...) fprintf (stderr, format "\n", ##__VA_ARGS__)
+#else
 #define gdk_debug_message(format, ...) g_fprintf (stderr, format "\n", ##__VA_ARGS__)
+#endif
 
 #ifdef G_ENABLE_DEBUG