[evolution-data-server] Remove camel_string_list_free().



commit d0e8c48c781177c1a8a30c713bb24f441aef5124
Author: Matthew Barnes <mbarnes redhat com>
Date:   Mon Sep 16 09:42:37 2013 -0400

    Remove camel_string_list_free().
    
    Use g_list_free_full(list, (GDestroyNotify) g_free) instead.

 camel/camel-mime-part.c                 |    7 ++++---
 camel/camel-string-utils.c              |   17 -----------------
 camel/camel-string-utils.h              |    2 --
 docs/reference/camel/camel-sections.txt |    1 -
 4 files changed, 4 insertions(+), 23 deletions(-)
---
diff --git a/camel/camel-mime-part.c b/camel/camel-mime-part.c
index e000b3d..84c3b21 100644
--- a/camel/camel-mime-part.c
+++ b/camel/camel-mime-part.c
@@ -409,7 +409,7 @@ mime_part_finalize (GObject *object)
        g_free (priv->content_md5);
        g_free (priv->content_location);
 
-       camel_string_list_free (priv->content_languages);
+       g_list_free_full (priv->content_languages, (GDestroyNotify) g_free);
        camel_content_disposition_unref (priv->disposition);
 
        camel_header_raw_clear (&CAMEL_MIME_PART (object)->headers);
@@ -1159,8 +1159,9 @@ camel_mime_part_set_content_languages (CamelMimePart *mime_part,
 {
        g_return_if_fail (CAMEL_IS_MIME_PART (mime_part));
 
-       if (mime_part->priv->content_languages)
-               camel_string_list_free (mime_part->priv->content_languages);
+       g_list_free_full (
+               mime_part->priv->content_languages,
+               (GDestroyNotify) g_free);
 
        mime_part->priv->content_languages = content_languages;
 
diff --git a/camel/camel-string-utils.c b/camel/camel-string-utils.c
index fe0b868..3188f75 100644
--- a/camel/camel-string-utils.c
+++ b/camel/camel-string-utils.c
@@ -52,23 +52,6 @@ camel_strcase_hash (gconstpointer v)
        return h;
 }
 
-static void
-free_string (gpointer string,
-             gpointer user_data)
-{
-       g_free (string);
-}
-
-void
-camel_string_list_free (GList *string_list)
-{
-       if (string_list == NULL)
-               return;
-
-       g_list_foreach (string_list, free_string, NULL);
-       g_list_free (string_list);
-}
-
 gchar *
 camel_strstrcase (const gchar *haystack,
                   const gchar *needle)
diff --git a/camel/camel-string-utils.h b/camel/camel-string-utils.h
index bff616c..96f4ee4 100644
--- a/camel/camel-string-utils.h
+++ b/camel/camel-string-utils.h
@@ -34,8 +34,6 @@ G_BEGIN_DECLS
 gint   camel_strcase_equal (gconstpointer a, gconstpointer b);
 guint camel_strcase_hash  (gconstpointer v);
 
-void camel_string_list_free (GList *string_list);
-
 gchar *camel_strstrcase (const gchar *haystack, const gchar *needle);
 
 const gchar *camel_strdown (gchar *str);
diff --git a/docs/reference/camel/camel-sections.txt b/docs/reference/camel/camel-sections.txt
index 5644725..28a68fa 100644
--- a/docs/reference/camel/camel-sections.txt
+++ b/docs/reference/camel/camel-sections.txt
@@ -3384,7 +3384,6 @@ camel_movemail
 <FILE>camel-string-utils</FILE>
 camel_strcase_equal
 camel_strcase_hash
-camel_string_list_free
 camel_strstrcase
 camel_strdown
 camel_pstring_add


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]