[glib] gkeyfile: Clarify handling of out-of-range integers in documentation



commit 24d1575b8d5157a7eed6266550beef4f735788d0
Author: Philip Withnall <withnall endlessm com>
Date:   Tue Jan 24 13:19:58 2017 +0000

    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 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/glib/gkeyfile.c b/glib/gkeyfile.c
index 87f2b91..abad20d 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):


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