mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 15:03:39 +02: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:
@@ -2607,7 +2607,7 @@ g_object_get_property (GObject *object,
|
||||
|
||||
if (G_VALUE_TYPE (value) == G_TYPE_INVALID)
|
||||
{
|
||||
/* uninitialized value */
|
||||
/* zero-initialized value */
|
||||
g_value_init (value, pspec->value_type);
|
||||
prop_value = value;
|
||||
}
|
||||
|
Reference in New Issue
Block a user