summaryrefslogtreecommitdiff
path: root/json-glib/json-builder.c
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2015-01-25 11:47:23 +0000
committerPhilip Withnall <philip.withnall@collabora.co.uk>2015-01-25 17:02:58 +0000
commitaee569b0bc2542aa8f1d13d66ddadacbda1035ac (patch)
treee2475efb4119e827ea0582a3fbff6b3cfefa2646 /json-glib/json-builder.c
parent1f6668a9534c01523361075dad290c0dc49d7623 (diff)
downloadjson-glib-aee569b0bc2542aa8f1d13d66ddadacbda1035ac.tar.gz
builder: Add missing (transfer) annotation to json_builder_add_value()
Document and annotate the fact that json_builder_add_value() takes ownership of the JsonNode passed in to it. https://bugzilla.gnome.org/show_bug.cgi?id=743475
Diffstat (limited to 'json-glib/json-builder.c')
-rw-r--r--json-glib/json-builder.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/json-glib/json-builder.c b/json-glib/json-builder.c
index f3d6599..d3a5cef 100644
--- a/json-glib/json-builder.c
+++ b/json-glib/json-builder.c
@@ -422,12 +422,14 @@ json_builder_set_member_name (JsonBuilder *builder,
/**
* json_builder_add_value:
* @builder: a #JsonBuilder
- * @node: the value of the member or element
+ * @node: (transfer full): the value of the member or element
*
* If called after json_builder_set_member_name(), sets @node as member of the
* most recent opened object, otherwise @node is added as element of the most
* recent opened array.
*
+ * The builder will take ownership of the #JsonNode.
+ *
* Return value: (transfer none): the #JsonBuilder, or %NULL if the call was inconsistent
*/
JsonBuilder *