mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 11:26:16 +01:00
g_object_get_property: Clarify meaning of G_TYPE_INVALID
"Uninitialized value" is partially correct, since it has not been initialized with a type, but it's more precise to say "zero-initialized value". It is still a programming error to pass a pointer to uninitialized memory with arbitrary contents as the value. Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
parent
1f79c7f7c0
commit
bf8b669061
@ -2607,7 +2607,7 @@ g_object_get_property (GObject *object,
|
|||||||
|
|
||||||
if (G_VALUE_TYPE (value) == G_TYPE_INVALID)
|
if (G_VALUE_TYPE (value) == G_TYPE_INVALID)
|
||||||
{
|
{
|
||||||
/* uninitialized value */
|
/* zero-initialized value */
|
||||||
g_value_init (value, pspec->value_type);
|
g_value_init (value, pspec->value_type);
|
||||||
prop_value = value;
|
prop_value = value;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user