diff options
author | Lucas de Castro Borges <lucas@gnuabordo.com.br> | 2024-04-22 18:07:32 -0300 |
---|---|---|
committer | Lucas de Castro Borges <lucas@gnuabordo.com.br> | 2024-04-22 18:07:32 -0300 |
commit | 5bba5c481d7273b475a39eb61e5eacec65d3c8e5 (patch) | |
tree | 514a1919f16464138651f925bb64eac3aa5cd7f9 /hardinfo2 | |
parent | 5f01c706267c595de92406a32e7f31ef5056c2d0 (diff) |
New upstream version 2.0.5preupstream/2.0.5pre
Diffstat (limited to 'hardinfo2')
-rw-r--r-- | hardinfo2/util.c | 19 |
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); } |