a11y: Cast g_object_ref() to the right type

In GLib 2.56, g_object_ref() will check that you're assigning the return
value to a variable of the same type you're passing in.
This commit is contained in:
Emmanuele Bassi 2018-02-11 15:01:43 +00:00
parent 80e5f28ca0
commit c229716796
2 changed files with 3 additions and 3 deletions

View File

@ -84,7 +84,7 @@ gtk_label_accessible_link_impl_get_hyperlink (AtkHyperlinkImpl *atk_impl)
{
GtkLabelAccessibleLinkImpl *impl = (GtkLabelAccessibleLinkImpl *)atk_impl;
return g_object_ref (impl->link);
return ATK_HYPERLINK (g_object_ref (impl->link));
}
static void

View File

@ -469,7 +469,7 @@ gtk_tree_view_accessible_ref_child (AtkObject *obj,
if (cell == NULL)
cell = create_cell (tree_view, accessible, tree, node, tv_col);
return g_object_ref (cell);
return ATK_OBJECT (g_object_ref (cell));
}
static AtkStateSet*
@ -562,7 +562,7 @@ gtk_tree_view_accessible_ref_accessible_at_point (AtkComponent *component,
if (cell == NULL)
cell = create_cell (tree_view, GTK_TREE_VIEW_ACCESSIBLE (component), tree, node, column);
return g_object_ref (cell);
return ATK_OBJECT (g_object_ref (cell));
}
static void