[glib] Document how to free return values from g_key_file_get_*_list



commit 7b22a8308f2a914b704051cd772edfa15e9a3b04
Author: Dan Williams <dcbw redhat com>
Date:   Wed Jul 20 17:28:20 2011 -0500

    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 files 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
  **/



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