aboutsummaryrefslogtreecommitdiff
path: root/hardinfo2/util.c
diff options
context:
space:
mode:
authorLucas de Castro Borges <lucas@gnuabordo.com.br>2024-04-22 18:07:37 -0300
committerLucas de Castro Borges <lucas@gnuabordo.com.br>2024-04-22 18:07:37 -0300
commit41b6cd0cf9e885faf45f0d0a4fa35055495279d7 (patch)
tree09dd3d3e220b058a9aa6762dfc60411be2ac2046 /hardinfo2/util.c
parent61a81feb3a316ea18b37ba0142fe895e714d10e5 (diff)
parent5bba5c481d7273b475a39eb61e5eacec65d3c8e5 (diff)
Update upstream source from tag 'upstream/2.0.5pre'
Update to upstream version '2.0.5pre' with Debian dir 9973fc57c4c67d50c40723e3e88c9b1c8e78f684
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);
}