Small optimization for g_object_set

We've already followed the redirection, no need
to check for that again - just avoid notifying
non-readable properties.
This commit is contained in:
Matthias Clasen 2021-09-20 08:18:32 -04:00
parent 97716e7b01
commit 23e37e05d2

View File

@ -1570,15 +1570,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);
}