/* Returns: the found #GList element, or NULL if it is not found  */
GList* g_list_find_custom(GList *list, gconstpointer data, GCompareFunc func)
/* Returns: the found #GList element, or NULL if it is not found  */
GList* g_list_find_custom(GList *list, gconstpointer data, GCompareFunc func)
{
  g_return_val_if_fail (func != NULL, list);
  while (list)
    {
      if (! func (list->data, data))
        return list;
      list = list->next;
    }
  return NULL;
}