mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-15 20:25:12 +01:00
gvalue: Use g_value_clear as clear function
This change allow leaving a scope before g_value_init() has been called. This would happen if you do: { g_auto(GValue) value = G_VALUE_INIT; } Or have a return statement (due to failure) before the part of your code where you set this GValue. https://bugzilla.gnome.org/show_bug.cgi?id=755766
This commit is contained in:
parent
1233962b54
commit
3bb2e8dfc9
@ -23,4 +23,4 @@
|
||||
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GObject, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GInitiallyUnowned, g_object_unref)
|
||||
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(GValue, g_value_unset)
|
||||
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(GValue, g_value_clear)
|
||||
|
Loading…
x
Reference in New Issue
Block a user