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:
Simon McVittie 2019-06-05 10:49:22 +01:00
parent 1f79c7f7c0
commit bf8b669061

View File

@ -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;
}