summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Thompson <will@willthompson.co.uk>2018-06-05 11:40:09 +0100
committerWill Thompson <will@willthompson.co.uk>2018-06-05 11:40:09 +0100
commiteef2a3a65c9943715e7b983b3bb5969b64a98928 (patch)
tree39633704d0fcce083291cf38a58019637e755b0c
parent221e4860d6f2b7ad6912167ab4167d9ec00498c8 (diff)
downloadjson-glib-object_get-with-wrong-types.tar.gz
get_*_member(): document more error casesobject_get-with-wrong-types
-rw-r--r--json-glib/json-object.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/json-glib/json-object.c b/json-glib/json-object.c
index 5fdc1d8..aa9a68f 100644
--- a/json-glib/json-object.c
+++ b/json-glib/json-object.c
@@ -627,7 +627,8 @@ json_object_get_ ##type_name## _member_with_default (JsonObject *object, \
*
* Convenience function that retrieves the integer value
* stored in @member_name of @object. It is an error to specify a
- * @member_name which does not exist.
+ * @member_name which does not exist or which holds a non-scalar,
+ * non-`null` value.
*
* See also: json_object_get_int_member_with_default(),
* json_object_get_member() and json_object_has_member()
@@ -666,7 +667,8 @@ JSON_OBJECT_GET_DEFAULT (gint64, int)
*
* Convenience function that retrieves the floating point value
* stored in @member_name of @object. It is an error to specify a
- * @member_name which does not exist.
+ * @member_name which does not exist or which holds a non-scalar,
+ * non-`null` value.
*
* See also: json_object_get_double_member_with_default(),
* json_object_get_member() and json_object_has_member()
@@ -705,7 +707,8 @@ JSON_OBJECT_GET_DEFAULT (double, double)
*
* Convenience function that retrieves the boolean value
* stored in @member_name of @object. It is an error to specify a
- * @member_name which does not exist.
+ * @member_name which does not exist or which holds a non-scalar,
+ * non-`null` value.
*
* See also: json_object_get_boolean_member_with_default(),
* json_object_get_member() and json_object_has_member()
@@ -744,7 +747,8 @@ JSON_OBJECT_GET_DEFAULT (gboolean, boolean)
*
* Convenience function that retrieves the string value
* stored in @member_name of @object. It is an error to specify a
- * @member_name that does not exist.
+ * @member_name that does not exist or which holds a non-scalar,
+ * non-`null` value.
*
* See also: json_object_get_string_member_with_default(),
* json_object_get_member() and json_object_has_member()
@@ -822,7 +826,8 @@ json_object_get_null_member (JsonObject *object,
*
* Convenience function that retrieves the array
* stored in @member_name of @object. It is an error to specify a
- * @member_name which does not exist.
+ * @member_name which does not exist or which holds a non-`null`, non-array
+ * value.
*
* See also: json_object_get_member() and json_object_has_member()
*
@@ -856,7 +861,7 @@ json_object_get_array_member (JsonObject *object,
*
* Convenience function that retrieves the object
* stored in @member_name of @object. It is an error to specify a @member_name
- * which does not exist.
+ * which does not exist or which holds a non-`null`, non-object value.
*
* See also: json_object_get_member() and json_object_has_member()
*