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
This commit is contained in:
Nicolas Dufresne 2015-09-29 08:30:21 -04:00
parent 3bb2e8dfc9
commit 3c0d38d68b

View File

@ -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)