* Gets a list of strings containing all the registered content types
* known to the system. The list and its data should be freed using
* <programlisting>
- * g_list_foreach (list, g_free, NULL);
- * g_list_free (list);
+ * g_list_free_full (list, g_free);
* </programlisting>
*
* Returns: (element-type utf8) (transfer full): #GList of the registered content types
static void
tree_matchlet_free (TreeMatchlet *matchlet)
{
- g_list_foreach (matchlet->matches, (GFunc)tree_matchlet_free, NULL);
- g_list_free (matchlet->matches);
+ g_list_free_full (matchlet->matches, (GDestroyNotify) tree_matchlet_free);
g_free (matchlet->path);
g_free (matchlet->mimetype);
g_slice_free (TreeMatchlet, matchlet);
static void
tree_match_free (TreeMatch *match)
{
- g_list_foreach (match->matches, (GFunc)tree_matchlet_free, NULL);
- g_list_free (match->matches);
+ g_list_free_full (match->matches, (GDestroyNotify) tree_matchlet_free);
g_free (match->contenttype);
g_slice_free (TreeMatch, match);
}
static void
tree_magic_shutdown (void)
{
- g_list_foreach (tree_matches, (GFunc)tree_match_free, NULL);
- g_list_free (tree_matches);
+ g_list_free_full (tree_matches, (GDestroyNotify) tree_match_free);
tree_matches = NULL;
}
* g_mount_guess_content_type().
*
* Returns: (transfer full) (array zero-terminated=1): an %NULL-terminated
- * array of zero or more content types, or %NULL. Free with g_strfreev()
+ * array of zero or more content types. Free with g_strfreev()
*
* Since: 2.18
*/