mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-09 20:19:20 +02:00
Avoid g_param_spec_get_redirect_target
Inline the getting of the redirect target. This is a rare thing, and the calls were showing up in profiles.
This commit is contained in:
parent
422bd8e966
commit
e85ab38cc7
@ -1339,9 +1339,8 @@ g_object_notify_by_spec_internal (GObject *object,
|
|||||||
if (G_UNLIKELY (~pspec->flags & G_PARAM_READABLE))
|
if (G_UNLIKELY (~pspec->flags & G_PARAM_READABLE))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
redirected = g_param_spec_get_redirect_target (pspec);
|
if (((GTypeInstance *)pspec)->g_class->g_type == G_TYPE_PARAM_OVERRIDE)
|
||||||
if (redirected != NULL)
|
pspec = ((GParamSpecOverride *)pspec)->overridden;
|
||||||
pspec = redirected;
|
|
||||||
|
|
||||||
if (pspec != NULL &&
|
if (pspec != NULL &&
|
||||||
_g_object_has_notify_handler (object))
|
_g_object_has_notify_handler (object))
|
||||||
@ -1570,7 +1569,6 @@ object_get_property (GObject *object,
|
|||||||
{
|
{
|
||||||
GObjectClass *class = g_type_class_peek (pspec->owner_type);
|
GObjectClass *class = g_type_class_peek (pspec->owner_type);
|
||||||
guint param_id = PARAM_SPEC_PARAM_ID (pspec);
|
guint param_id = PARAM_SPEC_PARAM_ID (pspec);
|
||||||
GParamSpec *redirect;
|
|
||||||
|
|
||||||
if (class == NULL)
|
if (class == NULL)
|
||||||
{
|
{
|
||||||
@ -1579,9 +1577,8 @@ object_get_property (GObject *object,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
redirect = g_param_spec_get_redirect_target (pspec);
|
if (((GTypeInstance *)pspec)->g_class->g_type == G_TYPE_PARAM_OVERRIDE)
|
||||||
if (redirect)
|
pspec = ((GParamSpecOverride *)pspec)->overridden;
|
||||||
pspec = redirect;
|
|
||||||
|
|
||||||
consider_issuing_property_deprecation_warning (pspec);
|
consider_issuing_property_deprecation_warning (pspec);
|
||||||
|
|
||||||
@ -1597,7 +1594,6 @@ object_set_property (GObject *object,
|
|||||||
GObjectClass *class = g_type_class_peek (pspec->owner_type);
|
GObjectClass *class = g_type_class_peek (pspec->owner_type);
|
||||||
GParamSpecClass *pclass;
|
GParamSpecClass *pclass;
|
||||||
guint param_id = PARAM_SPEC_PARAM_ID (pspec);
|
guint param_id = PARAM_SPEC_PARAM_ID (pspec);
|
||||||
GParamSpec *redirect;
|
|
||||||
|
|
||||||
if (G_UNLIKELY (class == NULL))
|
if (G_UNLIKELY (class == NULL))
|
||||||
{
|
{
|
||||||
@ -1606,9 +1602,8 @@ object_set_property (GObject *object,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
redirect = g_param_spec_get_redirect_target (pspec);
|
if (((GTypeInstance *)pspec)->g_class->g_type == G_TYPE_PARAM_OVERRIDE)
|
||||||
if (redirect)
|
pspec = ((GParamSpecOverride *)pspec)->overridden;
|
||||||
pspec = redirect;
|
|
||||||
|
|
||||||
consider_issuing_property_deprecation_warning (pspec);
|
consider_issuing_property_deprecation_warning (pspec);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user