From 3c0d38d68b78a6ea9e6ca82012f011075a625a2b Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Tue, 29 Sep 2015 08:30:21 -0400 Subject: [PATCH] gvalue: Improve _unset() documentation g_value_unset() only works with initialized value and will assert if the GValue is zero-filled (or initialized with G_VALUE_INIT). Document this behaviour and refer to g_value_clear() for a method that work on both initialized and zero-filled GValue. https://bugzilla.gnome.org/show_bug.cgi?id=755766 --- gobject/gvalue.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gobject/gvalue.c b/gobject/gvalue.c index c91584e93..32ad86725 100644 --- a/gobject/gvalue.c +++ b/gobject/gvalue.c @@ -257,7 +257,9 @@ g_value_reset (GValue *value) * Clears the current value in @value and "unsets" the type, * this releases all resources associated with this GValue. * An unset value is the same as an uninitialized (zero-filled) - * #GValue structure. + * #GValue structure. Note that you cannot call this method on + * uninitialized structure, for that, g_value_clear() method can + * be used. */ void g_value_unset (GValue *value)