[NetworkManager-fortisslvpn] shared: un-deprecate g_clear_pointer for newer glib



commit f29af345a14ff62c9909e5a6e82b5de626387eb0
Author: Lubomir Rintel <lkundrak v3 sk>
Date:   Sun Feb 14 10:49:51 2021 +0100

    shared: un-deprecate g_clear_pointer for newer glib

 shared/nm-utils/nm-glib.h | 8 ++++++++
 1 file changed, 8 insertions(+)
---
diff --git a/shared/nm-utils/nm-glib.h b/shared/nm-utils/nm-glib.h
index 824a08c..7636684 100644
--- a/shared/nm-utils/nm-glib.h
+++ b/shared/nm-utils/nm-glib.h
@@ -86,6 +86,14 @@ __g_type_ensure (GType type)
  * the APIs that we emulate above.
  */
 
+#undef g_clear_pointer
+#define g_clear_pointer(pp, destroy) \
+       G_STMT_START { \
+               G_GNUC_BEGIN_IGNORE_DEPRECATIONS \
+               g_clear_pointer((void **)pp, destroy); \
+               G_GNUC_END_IGNORE_DEPRECATIONS \
+       } G_STMT_END
+
 #define g_test_expect_message(domain, level, format...) \
        G_STMT_START { \
                G_GNUC_BEGIN_IGNORE_DEPRECATIONS \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]