mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-12 15:36:17 +01:00
Consistently use param_spec_follow_override
This commit is contained in:
parent
47c12389a0
commit
df43536a68
@ -954,6 +954,14 @@ g_object_interface_install_property (gpointer g_iface,
|
||||
(void) install_property_internal (iface_class->g_type, 0, pspec);
|
||||
}
|
||||
|
||||
/* Inlined version of g_param_spec_get_redirect_target(), for speed */
|
||||
static inline void
|
||||
param_spec_follow_override (GParamSpec **pspec)
|
||||
{
|
||||
if (((GTypeInstance *) (*pspec))->g_class->g_type == G_TYPE_PARAM_OVERRIDE)
|
||||
*pspec = ((GParamSpecOverride *) (*pspec))->overridden;
|
||||
}
|
||||
|
||||
/**
|
||||
* g_object_class_find_property:
|
||||
* @oclass: a #GObjectClass
|
||||
@ -975,8 +983,8 @@ g_object_class_find_property (GObjectClass *class,
|
||||
|
||||
pspec = find_pspec (class, property_name);
|
||||
|
||||
if (pspec && ((GTypeInstance *)pspec)->g_class->g_type == G_TYPE_PARAM_OVERRIDE)
|
||||
pspec = ((GParamSpecOverride *)pspec)->overridden;
|
||||
if (pspec)
|
||||
param_spec_follow_override (&pspec);
|
||||
|
||||
return pspec;
|
||||
}
|
||||
@ -1432,14 +1440,6 @@ g_object_freeze_notify (GObject *object)
|
||||
g_object_unref (object);
|
||||
}
|
||||
|
||||
/* Inlined version of g_param_spec_get_redirect_target(), for speed */
|
||||
static inline void
|
||||
param_spec_follow_override (GParamSpec **pspec)
|
||||
{
|
||||
if (((GTypeInstance *) (*pspec))->g_class->g_type == G_TYPE_PARAM_OVERRIDE)
|
||||
*pspec = ((GParamSpecOverride *) (*pspec))->overridden;
|
||||
}
|
||||
|
||||
static inline void
|
||||
g_object_notify_by_spec_internal (GObject *object,
|
||||
GParamSpec *pspec)
|
||||
|
Loading…
Reference in New Issue
Block a user