mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-05-25 23:10:39 +02:00
Merge branch 'g-object-get-property-zero-init' into 'master'
g_object_get_property: Improve documentation for use of G_VALUE_INIT See merge request GNOME/glib!1023
This commit is contained in:
commit
57b6b4b1e8
@ -2573,6 +2573,7 @@ g_object_set_property (GObject *object,
|
|||||||
*
|
*
|
||||||
* - an empty #GValue initialized by %G_VALUE_INIT, which will be
|
* - an empty #GValue initialized by %G_VALUE_INIT, which will be
|
||||||
* automatically initialized with the expected type of the property
|
* automatically initialized with the expected type of the property
|
||||||
|
* (since GLib 2.60)
|
||||||
* - a #GValue initialized with the expected type of the property
|
* - a #GValue initialized with the expected type of the property
|
||||||
* - a #GValue initialized with a type to which the expected type
|
* - a #GValue initialized with a type to which the expected type
|
||||||
* of the property can be transformed
|
* of the property can be transformed
|
||||||
@ -2607,7 +2608,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…
x
Reference in New Issue
Block a user