diff options
author | Bertrand Guiheneuf <Bertrand.Guiheneuf@inria.fr> | 1999-05-11 00:15:19 +0800 |
---|---|---|
committer | Bertrand Guiheneuf <bertrand@src.gnome.org> | 1999-05-11 00:15:19 +0800 |
commit | 88f5b33f67bfe54a668bed1dfe203451eba7e027 (patch) | |
tree | bf38f9d4667d34f3c43d84a5ff55a6e8a71bc1e2 /camel/gstring-util.c | |
parent | 62b338094aac49edd76acbc227e18c4f06e726c1 (diff) | |
download | gsoc2013-evolution-88f5b33f67bfe54a668bed1dfe203451eba7e027.tar.gz gsoc2013-evolution-88f5b33f67bfe54a668bed1dfe203451eba7e027.tar.zst gsoc2013-evolution-88f5b33f67bfe54a668bed1dfe203451eba7e027.zip |
A bunch of new set/get func.
1999-05-10 Bertrand Guiheneuf <Bertrand.Guiheneuf@inria.fr>
* camel/camel-mime-part.c (__camel_mime_part_get_header_lines):
(__camel_mime_part_set_header_lines):
(__camel_mime_part_get_content_languages):
(__camel_mime_part_set_content_languages):
(__camel_mime_part_get_encoding):
(__camel_mime_part_set_encoding):
(__camel_mime_part_get_content_MD5):
(__camel_mime_part_set_content_MD5):
(__camel_mime_part_get_content_id):
(__camel_mime_part_set_content_id):
A bunch of new set/get func.
* camel/gstring-util.c (g_string_list_free):
convenience function for string list
complete deallocation.
svn path=/trunk/; revision=900
Diffstat (limited to 'camel/gstring-util.c')
-rw-r--r-- | camel/gstring-util.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/camel/gstring-util.c b/camel/gstring-util.c index 43e482154e..05cdc08beb 100644 --- a/camel/gstring-util.c +++ b/camel/gstring-util.c @@ -201,7 +201,27 @@ g_string_equal_for_hash (gconstpointer v, gconstpointer v2) * * Return value: **/ -guint g_string_hash (gconstpointer v) +guint +g_string_hash (gconstpointer v) { return g_str_hash(((const GString*)v)->str); } + + + + +/* utility func : frees a GString element in a GList */ +static void +__g_string_list_free_string (gpointer data, gpointer user_data) +{ + GString *string = (GString *)data; + g_string_free(string, TRUE); +} + + +void +g_string_list_free (GList *string_list) +{ + g_list_foreach(string_list, __g_string_list_free_string, NULL); + g_list_free(string_list); +} |