From 24d1575b8d5157a7eed6266550beef4f735788d0 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Tue, 24 Jan 2017 13:19:58 +0000 Subject: [PATCH] gkeyfile: Clarify handling of out-of-range integers in documentation Clarify that g_key_file_get_integer() and g_key_file_get_integer_list() both return G_KEY_FILE_ERROR_INVALID_VALUE if used to load a valid integer which is out of range for a gint. --- glib/gkeyfile.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/glib/gkeyfile.c b/glib/gkeyfile.c index 87f2b9109..abad20d39 100644 --- a/glib/gkeyfile.c +++ b/glib/gkeyfile.c @@ -2543,7 +2543,8 @@ g_key_file_set_boolean_list (GKeyFile *key_file, * * If @key cannot be found then 0 is returned and @error is set to * #G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if the value associated - * with @key cannot be interpreted as an integer then 0 is returned + * with @key cannot be interpreted as an integer, or is out of range + * for a #gint, then 0 is returned * and @error is set to #G_KEY_FILE_ERROR_INVALID_VALUE. * * Returns: the value associated with the key as an integer, or @@ -2793,7 +2794,8 @@ g_key_file_set_uint64 (GKeyFile *key_file, * * If @key cannot be found then %NULL is returned and @error is set to * #G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if the values associated - * with @key cannot be interpreted as integers then %NULL is returned + * with @key cannot be interpreted as integers, or are out of range for + * #gint, then %NULL is returned * and @error is set to #G_KEY_FILE_ERROR_INVALID_VALUE. * * Returns: (array length=length) (element-type gint) (transfer container):