diff options
author | Krzesimir Nowak <qdlacz@gmail.com> | 2016-05-11 09:37:21 +0200 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2016-05-11 10:18:05 -0400 |
commit | 89d8dc979b363dea363a0a03999ddcc17f21798f (patch) | |
tree | 63068c5cc6ff2c3e8ea72cb950957c7ae8cf40ad | |
parent | bcbd8d73cecdd2050670fab6502fab8c84d8cec5 (diff) | |
download | glib-89d8dc979b363dea363a0a03999ddcc17f21798f.tar.gz |
docs: Clarify clearing the builder after ending the build process
There is no need to call g_variant_builder_clear() after the
g_variant_builder_end(). This is mentioned in docs of the former
function, but not in the docs of the latter one. Add them there too.
-rw-r--r-- | glib/gvariant.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/glib/gvariant.c b/glib/gvariant.c index 209cfb61d..ba34ff86b 100644 --- a/glib/gvariant.c +++ b/glib/gvariant.c @@ -3591,7 +3591,10 @@ g_variant_make_array_type (GVariant *element) * It is not permissible to use @builder in any way after this call * except for reference counting operations (in the case of a * heap-allocated #GVariantBuilder) or by reinitialising it with - * g_variant_builder_init() (in the case of stack-allocated). + * g_variant_builder_init() (in the case of stack-allocated). This + * means that for the stack-allocated builders there is no need to + * call g_variant_builder_clear() after the call to + * g_variant_builder_end(). * * It is an error to call this function in any way that would create an * inconsistent value to be constructed (ie: insufficient number of |