mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-13 07:56:17 +01:00
Merge branch 'prop-set-speedups' into 'main'
Small optimization for g_object_set See merge request GNOME/glib!2254
This commit is contained in:
commit
3f1a1cdb78
@ -1572,15 +1572,9 @@ object_set_property (GObject *object,
|
||||
{
|
||||
class->set_property (object, param_id, &tmp_value, pspec);
|
||||
|
||||
if (~pspec->flags & G_PARAM_EXPLICIT_NOTIFY)
|
||||
{
|
||||
GParamSpec *notify_pspec;
|
||||
|
||||
notify_pspec = get_notify_pspec (pspec);
|
||||
|
||||
if (notify_pspec != NULL)
|
||||
g_object_notify_queue_add (object, nqueue, notify_pspec);
|
||||
}
|
||||
if (~pspec->flags & G_PARAM_EXPLICIT_NOTIFY &&
|
||||
pspec->flags & G_PARAM_READABLE)
|
||||
g_object_notify_queue_add (object, nqueue, pspec);
|
||||
}
|
||||
g_value_unset (&tmp_value);
|
||||
}
|
||||
@ -2531,17 +2525,14 @@ g_object_getv (GObject *object,
|
||||
|
||||
g_object_ref (object);
|
||||
|
||||
memset (values, 0, n_properties * sizeof (GValue));
|
||||
|
||||
obj_type = G_OBJECT_TYPE (object);
|
||||
for (i = 0; i < n_properties; i++)
|
||||
{
|
||||
pspec = g_param_spec_pool_lookup (pspec_pool,
|
||||
names[i],
|
||||
obj_type,
|
||||
TRUE);
|
||||
pspec = g_param_spec_pool_lookup (pspec_pool, names[i], obj_type, TRUE);
|
||||
if (!g_object_get_is_valid_property (object, pspec, names[i]))
|
||||
break;
|
||||
|
||||
memset (&values[i], 0, sizeof (GValue));
|
||||
g_value_init (&values[i], pspec->value_type);
|
||||
object_get_property (object, pspec, &values[i]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user