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:
Matthias Clasen 2015-09-07 03:02:11 -04:00
parent f1f80111c9
commit 44af2b1c17

View File

@ -579,7 +579,9 @@ g_param_spec_steal_qdata (GParamSpec *pspec,
GParamSpec*
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;
else
return NULL;