aboutsummaryrefslogtreecommitdiff
path: root/hardinfo2/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'hardinfo2/util.c')
-rw-r--r--hardinfo2/util.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/hardinfo2/util.c b/hardinfo2/util.c
index e12963c0..e573e63e 100644
--- a/hardinfo2/util.c
+++ b/hardinfo2/util.c
@@ -943,6 +943,22 @@ GSList *modules_get_list()
return modules_list;
}
+//Compatibility
+#if GLIB_CHECK_VERSION(2,44,0)
+#else
+static inline gpointer
+g2_steal_pointer (gpointer pp)
+{
+ gpointer *ptr = (gpointer *) pp;
+ gpointer ref;
+
+ ref = *ptr;
+ *ptr = NULL;
+
+ return ref;
+}
+#endif
+
static GSList *modules_load(gchar ** module_list)
{
GDir *dir;
@@ -975,8 +991,9 @@ static GSList *modules_load(gchar ** module_list)
filenames = g_list_delete_link(filenames, item);
}
#if GLIB_CHECK_VERSION(2,44,0)
- //FIXME change this to not use g_steal_pointer
g_list_free_full (g_steal_pointer (&filenames), g_object_unref);
+#else
+ g_list_free_full (g2_steal_pointer (&filenames), g_object_unref);
#endif
g_dir_close(dir);
}