diff options
author | Ryan Lortie <desrt@desrt.ca> | 2010-03-21 13:46:09 -0500 |
---|---|---|
committer | Ryan Lortie <desrt@desrt.ca> | 2010-03-21 13:46:09 -0500 |
commit | c5a1c95b1f991db6700a204e5d41c8cc650c7d42 (patch) | |
tree | fcbc7ea0f613900f6f7690cfdb6603b403218d9e /glib/gvariant-parser.c | |
parent | 5c419c300b43b4e3ac462761dda4360ed1c5de9b (diff) | |
download | glib-c5a1c95b1f991db6700a204e5d41c8cc650c7d42.tar.gz |
GVariant docs fixes
Diffstat (limited to 'glib/gvariant-parser.c')
-rw-r--r-- | glib/gvariant-parser.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/glib/gvariant-parser.c b/glib/gvariant-parser.c index 2e35d0504..46f48a5d3 100644 --- a/glib/gvariant-parser.c +++ b/glib/gvariant-parser.c @@ -2097,12 +2097,25 @@ g_variant_parse (const GVariantType *type, * g_variant_new_parsed_va: * @format: a text format #GVariant * @app: a pointer to a #va_list - * @returns: a new floating #GVariant instance + * @returns: a new, usually floating, #GVariant * * Parses @format and returns the result. * * This is the version of g_variant_new_parsed() intended to be used * from libraries. + * + * The return value will be floating if it was a newly created GVariant + * instance. In the case that @format simply specified the collection + * of a #GVariant pointer (eg: @format was "%*") then the collected + * #GVariant pointer will be returned unmodified, without adding any + * additional references. + * + * In order to behave correctly in all cases it is necessary for the + * calling function to g_variant_ref_sink() the return result before + * returning control to the user that originally provided the pointer. + * At this point, the caller will have their own full reference to the + * result. This can also be done by adding the result to a container, + * or by passing it to another g_variant_new() call. **/ GVariant * g_variant_new_parsed_va (const gchar *format, @@ -2139,6 +2152,7 @@ g_variant_new_parsed_va (const gchar *format, * g_variant_new_parsed: * @format: a text format #GVariant * @...: arguments as per @format + * @returns: a new floating #GVariant instance * * Parses @format and returns the result. * |