From 09de5efbaa85d79e04f1c2375f5870c9aeba65f5 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Fri, 16 May 2008 10:28:33 +0000 Subject: Implement g_strfreev and add stub for g_key_file_get_string_list --- eglib/gmain.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'eglib/gmain.c') diff --git a/eglib/gmain.c b/eglib/gmain.c index a3fa95a9..27f168d5 100644 --- a/eglib/gmain.c +++ b/eglib/gmain.c @@ -1539,6 +1539,19 @@ gboolean g_str_has_suffix(const gchar *str, const gchar *suffix) return strcmp(str + str_len - suffix_len, suffix) == 0; } +void g_strfreev(gchar **str_array) +{ + int i; + + if (str_array == NULL) + return; + + for(i = 0; str_array[i] != NULL; i++) + g_free(str_array[i]); + + g_free(str_array); +} + /* GKeyFile */ struct _GKeyFile { @@ -1718,10 +1731,17 @@ gint g_key_file_get_integer(GKeyFile *key_file, ret = atoi(str); g_free(str); - + return ret; } +gchar **g_key_file_get_string_list(GKeyFile *key_file, const gchar *group_name, + const gchar *key, gsize *length, + GError **error) +{ + return g_new0(gchar *, 1); +} + /* GString */ #define MY_MAXSIZE ((gsize)-1) -- cgit