[glib] gvalue: Improve _unset() documentation
- From: Nicolas Dufresne <nicolasd src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gvalue: Improve _unset() documentation
- Date: Tue, 29 Sep 2015 12:40:54 +0000 (UTC)
commit 3c0d38d68b78a6ea9e6ca82012f011075a625a2b
Author: Nicolas Dufresne <nicolas dufresne collabora co uk>
Date: Tue Sep 29 08:30:21 2015 -0400
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 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gobject/gvalue.c b/gobject/gvalue.c
index c91584e..32ad867 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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]