After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 654412 - Documentation for g_variant_get_child_value unclear
Documentation for g_variant_get_child_value unclear
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gvariant
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Allison Karlitskaya (desrt)
gtkdev
Depends on:
Blocks:
 
 
Reported: 2011-07-11 18:48 UTC by Michal Hruby
Modified: 2011-10-04 21:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GVariant: add a clarification to the docs (980 bytes, patch)
2011-10-04 21:28 UTC, Allison Karlitskaya (desrt)
committed Details | Review

Description Michal Hruby 2011-07-11 18:48:08 UTC
The documentation for g_variant_get_child_value is unclear wrt floating references - what happens if I get child of floating variant? Will it also have floating reference? Is it different if the parent isn't floating?

The documentation should mention that the returned GVariant is never floating, and therefore has be unreffed in each and every case.
Comment 1 Allison Karlitskaya (desrt) 2011-10-04 21:28:11 UTC
Created attachment 198262 [details] [review]
GVariant: add a clarification to the docs

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().