qulogic/gplugin

Replace the internal users of gplugin_manager_free_plugin_list with g_slist_free_full
feature/remove-gplugin_manager_free_plugin_list
2020-02-22, Gary Kramlich
207a4982ca78
Parents a6f4784afe0b
Children fa06a06a8aa5
Replace the internal users of gplugin_manager_free_plugin_list with g_slist_free_full
--- a/gplugin/gplugin-manager.c Fri Feb 21 00:11:31 2020 -0600
+++ b/gplugin/gplugin-manager.c Sat Feb 22 05:12:54 2020 -0600
@@ -628,7 +628,7 @@
}
}
- gplugin_manager_free_plugin_list(dependencies);
+ g_slist_free_full(dependencies, g_object_unref);
return all_loaded;
}
@@ -686,7 +686,7 @@
/* prepend the first found match to our return value */
ret = g_slist_prepend(ret, g_object_ref(matches->data));
- gplugin_manager_free_plugin_list(matches);
+ g_slist_free_full(matches, g_object_unref);
found = TRUE;
@@ -699,7 +699,7 @@
_("failed to find dependency %s for %s"),
dependencies[i], gplugin_plugin_info_get_id(info));
- gplugin_manager_free_plugin_list(ret);
+ g_slist_free_full(ret, g_object_unref);
g_object_unref(G_OBJECT(info));
@@ -1259,8 +1259,8 @@
*
* Returns: (element-type GPlugin.Plugin) (transfer full): A #GSList of
* referenced #GPluginPlugin's matching @id. Call
- * gplugin_manager_free_plugin_list() on the returned value when
- * you're done with it.
+ * g_slist_free_full with a `DestroyNotify` of #g_object_unref on the
+ * returned value when you're done with it.
*/
GSList *
gplugin_manager_find_plugins(const gchar *id) {
@@ -1289,8 +1289,8 @@
*
* Returns: (element-type GPlugin.Plugin) (transfer full): A #GSList of
* referenced #GPluginPlugin's matching @id. Call
- * gplugin_manager_free_plugin_list() on the returned value when
- * you're done with it.
+ * g_slist_free_full() with a `DestroyNotify` of #g_object_unref on
+ * the returned value when you're done with it.
*/
GSList *
gplugin_manager_find_plugins_with_version(const gchar *id, const gchar *op,
@@ -1361,7 +1361,7 @@
}
}
- gplugin_manager_free_plugin_list(plugins);
+ g_slist_free_full(plugins, g_object_unref);
return g_slist_reverse(filtered);
}
@@ -1415,7 +1415,7 @@
plugin = GPLUGIN_PLUGIN(g_object_ref(G_OBJECT(plugins_list->data)));
- gplugin_manager_free_plugin_list(plugins_list);
+ g_slist_free_full(plugins_list, g_object_unref);
return plugin;
}
@@ -1429,8 +1429,9 @@
*
* Return value: (element-type GPlugin.Plugin) (transfer full): A #GSList of
* #GPluginPlugin's that @plugin depends on, or %NULL on error
- * with @error set. Call #gplugin_manager_free_plugin_list on
- * the returned value when you're done with it.
+ * with @error set. Call g_slist_free_full() with a
+ * `DestroyNotify` of #g_object_unref on the returned value when
+ * you're done with it.
*/
GSList *
gplugin_manager_get_plugin_dependencies(GPluginPlugin *plugin, GError **error) {