[json-glib] lib: Trivial documentation clarifications
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [json-glib] lib: Trivial documentation clarifications
- Date: Tue, 1 Sep 2015 10:13:00 +0000 (UTC)
commit bfbc0b48e9256473491755766c079f73bee80724
Author: Philip Withnall <philip withnall collabora co uk>
Date: Tue Sep 1 10:05:23 2015 +0100
lib: Trivial documentation clarifications
Clarify the documentation for json_node_set_object() and
json_object_get_array_member().
https://bugzilla.gnome.org/show_bug.cgi?id=754384
json-glib/json-node.c | 4 +++-
json-glib/json-object.c | 6 ++++--
2 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/json-glib/json-node.c b/json-glib/json-node.c
index 13968bc..fb95f42 100644
--- a/json-glib/json-node.c
+++ b/json-glib/json-node.c
@@ -410,9 +410,11 @@ json_node_copy (JsonNode *node)
/**
* json_node_set_object:
* @node: a #JsonNode initialized to %JSON_NODE_OBJECT
- * @object: a #JsonObject
+ * @object: (nullable): a #JsonObject
*
* Sets @objects inside @node. The reference count of @object is increased.
+ *
+ * If @object is %NULL, the node’s existing object is cleared.
*/
void
json_node_set_object (JsonNode *node,
diff --git a/json-glib/json-object.c b/json-glib/json-object.c
index 6d203b2..c71d8f9 100644
--- a/json-glib/json-object.c
+++ b/json-glib/json-object.c
@@ -722,11 +722,13 @@ json_object_get_array_member (JsonObject *object,
* @member_name: the name of the member
*
* Convenience function that retrieves the object
- * stored in @member_name of @object
+ * stored in @member_name of @object. It is an error to specify a @member_name
+ * which does not exist.
*
* See also: json_object_get_member()
*
- * Return value: (transfer none): the object inside the object's member
+ * Return value: (transfer none) (nullable): the object inside the object’s
+ * member, or %NULL if the value for the member is `null`
*
* Since: 0.8
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]