summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sensei-raw-ctl-gui.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/sensei-raw-ctl-gui.c b/sensei-raw-ctl-gui.c
index 3a7de24..aa22b13 100644
--- a/sensei-raw-ctl-gui.c
+++ b/sensei-raw-ctl-gui.c
@@ -30,15 +30,8 @@
#include "config.h"
#if ! GLIB_CHECK_VERSION (2, 34, 0)
-static void
-g_clear_pointer (void **pointer, void (*destroy) (void *))
-{
- if (*pointer)
- {
- destroy (*pointer);
- *pointer = NULL;
- }
-}
+#define g_clear_pointer(p, destroy) \
+ G_STMT_START if (*(p)) { (destroy) (*(p)); *(p) = NULL; } G_STMT_END
#endif // ! GLIB_CHECK_VERSION (2, 34)
/** User interface string for GtkBuilder. */