From bc159207bd05ca4bfc8e6f7ea819ee487bf75705 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 23 Sep 2022 10:32:07 -0400 Subject: [PATCH] gdk: Drop old debug macros Drop the old GDK_NOTE() and GDK_DISPLAY_NOTE() macros from gdkdebug.h. Reintroduce them in the win32 backend, where they are still used. --- gdk/gdkdebug.h | 5 ----- gdk/win32/gdkdrag-win32.c | 2 ++ gdk/win32/gdkprivate-win32.h | 18 ++++++++++++++++++ 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/gdk/gdkdebug.h b/gdk/gdkdebug.h index 45519a1b4d..0dad93e828 100644 --- a/gdk/gdkdebug.h +++ b/gdk/gdkdebug.h @@ -65,9 +65,6 @@ void gdk_display_set_debug_flags (GdkDisplay *display, #define GDK_DISPLAY_DEBUG_CHECK(display,type) \ G_UNLIKELY (gdk_display_get_debug_flags (display) & GDK_DEBUG_##type) -#define GDK_DISPLAY_NOTE(display,type,action) G_STMT_START { \ - if (GDK_DISPLAY_DEBUG_CHECK (display,type)) \ - { action; }; } G_STMT_END #define GDK_DISPLAY_DEBUG(display,type,...) \ if (GDK_DISPLAY_DEBUG_CHECK (display,type)) \ @@ -76,13 +73,11 @@ void gdk_display_set_debug_flags (GdkDisplay *display, #else /* !G_ENABLE_DEBUG */ #define GDK_DISPLAY_DEBUG_CHECK(display,type) 0 -#define GDK_DISPLAY_NOTE(display,type,action) #define GDK_DISPLAY_DEBUG(display,type,...) #endif /* G_ENABLE_DEBUG */ #define GDK_DEBUG_CHECK(type) GDK_DISPLAY_DEBUG_CHECK (NULL,type) -#define GDK_NOTE(type,action) GDK_DISPLAY_NOTE (NULL,type,action) #define GDK_DEBUG(type,...) GDK_DISPLAY_DEBUG (NULL,type,__VA_ARGS__) #endif diff --git a/gdk/win32/gdkdrag-win32.c b/gdk/win32/gdkdrag-win32.c index a53f6569b1..68bfbed814 100644 --- a/gdk/win32/gdkdrag-win32.c +++ b/gdk/win32/gdkdrag-win32.c @@ -37,6 +37,8 @@ #include #include +#define GDK_NOTE(a,b) + /* * Support for OLE-2 drag and drop added at Archaeopteryx Software, 2001 * For more information, do not contact Stephan R.A. Deibel (sdeibel@archaeopteryx.com), diff --git a/gdk/win32/gdkprivate-win32.h b/gdk/win32/gdkprivate-win32.h index c6ef3455df..3979970f59 100644 --- a/gdk/win32/gdkprivate-win32.h +++ b/gdk/win32/gdkprivate-win32.h @@ -26,6 +26,7 @@ #define __GDK_PRIVATE_WIN32_H__ #include +#include #include #include #include @@ -37,6 +38,23 @@ #include "config.h" + +/* Old debug macros */ + +#ifdef G_ENABLE_DEBUG + +#define GDK_NOTE(type,action) \ + G_STMT_START { \ + if (GDK_DEBUG_CHECK (type)) \ + { action; }; \ + } G_STMT_END + +#else + +#define GDK_NOTE(type,action) + +#endif + /* Make up for some minor w32api or MSVC6 header lossage */ #ifndef PS_JOIN_MASK