mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-20 15:48:54 +02:00
Simplify g_param_spec_get_redirect_target a bit more
It is enough to look for exact matches here, so no need to dive into g_type_instance_is_a and take locks, etc.
This commit is contained in:
@@ -579,7 +579,9 @@ g_param_spec_steal_qdata (GParamSpec *pspec,
|
|||||||
GParamSpec*
|
GParamSpec*
|
||||||
g_param_spec_get_redirect_target (GParamSpec *pspec)
|
g_param_spec_get_redirect_target (GParamSpec *pspec)
|
||||||
{
|
{
|
||||||
if (G_IS_PARAM_SPEC_OVERRIDE (pspec))
|
GTypeInstance *inst = (GTypeInstance *)pspec;
|
||||||
|
|
||||||
|
if (inst && inst->g_class && inst->g_class->g_type == G_TYPE_PARAM_OVERRIDE)
|
||||||
return ((GParamSpecOverride*)pspec)->overridden;
|
return ((GParamSpecOverride*)pspec)->overridden;
|
||||||
else
|
else
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Reference in New Issue
Block a user