From 7b22a8308f2a914b704051cd772edfa15e9a3b04 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 20 Jul 2011 17:28:20 -0500 Subject: [PATCH] Document how to free return values from g_key_file_get_*_list Makes the docs consistent with the string list getters. Add GOI annotations while we're at it. --- glib/gkeyfile.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/glib/gkeyfile.c b/glib/gkeyfile.c index 0b7ec15..9d7e875 100644 --- a/glib/gkeyfile.c +++ b/glib/gkeyfile.c @@ -1986,8 +1986,10 @@ g_key_file_set_boolean (GKeyFile *key_file, * with @key cannot be interpreted as booleans then %NULL is returned * and @error is set to #G_KEY_FILE_ERROR_INVALID_VALUE. * - * Return value: the values associated with the key as a list of - * booleans, or %NULL if the key was not found or could not be parsed. + * Return value: (array length=length) (element-type gboolean) (transfer container): + * the values associated with the key as a list of booleans, or %NULL if the + * key was not found or could not be parsed. The returned list of booleans + * should be freed with g_free() when no longer needed. * * Since: 2.6 **/ @@ -2351,8 +2353,10 @@ g_key_file_set_uint64 (GKeyFile *key_file, * with @key cannot be interpreted as integers then %NULL is returned * and @error is set to #G_KEY_FILE_ERROR_INVALID_VALUE. * - * Return value: the values associated with the key as a list of - * integers, or %NULL if the key was not found or could not be parsed. + * Return value: (array length=length) (element-type gint) (transfer container): + * the values associated with the key as a list of integers, or %NULL if + * the key was not found or could not be parsed. The returned list of + * integers should be freed with g_free() when no longer needed. * * Since: 2.6 **/ @@ -2562,8 +2566,10 @@ g_key_file_set_double (GKeyFile *key_file, * with @key cannot be interpreted as doubles then %NULL is returned * and @error is set to #G_KEY_FILE_ERROR_INVALID_VALUE. * - * Return value: the values associated with the key as a list of - * doubles, or %NULL if the key was not found or could not be parsed. + * Return value: (array length=length) (element-type gdouble) (transfer container): + * the values associated with the key as a list of doubles, or %NULL if the + * key was not found or could not be parsed. The returned list of doubles + * should be freed with g_free() when no longer needed. * * Since: 2.12 **/ -- 2.7.4