GVariant: add a clarification to the docs
authorRyan Lortie <desrt@desrt.ca>
Tue, 4 Oct 2011 21:27:27 +0000 (17:27 -0400)
committerRyan Lortie <desrt@desrt.ca>
Tue, 4 Oct 2011 21:32:53 +0000 (17:32 -0400)
Add a note to the doc for g_viarnat_get_child_value() that the return
value is non-floating and must be freed with g_variant_unref().

https://bugzilla.gnome.org/show_bug.cgi?id=654412

glib/gvariant-core.c

index fab3a14..7e63acb 100644 (file)
@@ -899,6 +899,9 @@ g_variant_n_children (GVariant *value)
  * It is an error if @index_ is greater than the number of child items
  * in the container.  See g_variant_n_children().
  *
+ * The returned value is never floating.  You should free it with
+ * g_variant_unref() when you're done with it.
+ *
  * This function is O(1).
  *
  * Since: 2.24