[glib] docs: Clarify clearing the builder after ending the build process



commit 89d8dc979b363dea363a0a03999ddcc17f21798f
Author: Krzesimir Nowak <qdlacz gmail com>
Date:   Wed May 11 09:37:21 2016 +0200

    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.

 glib/gvariant.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/glib/gvariant.c b/glib/gvariant.c
index 209cfb6..ba34ff8 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]