From c229716796b8b2f424a1ada542768e0131b951a2 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Sun, 11 Feb 2018 15:01:43 +0000 Subject: 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. --- gtk/a11y/gtklabelaccessible.c | 2 +- gtk/a11y/gtktreeviewaccessible.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'gtk/a11y') diff --git a/gtk/a11y/gtklabelaccessible.c b/gtk/a11y/gtklabelaccessible.c index add0861f93..29cd58ece8 100644 --- a/gtk/a11y/gtklabelaccessible.c +++ b/gtk/a11y/gtklabelaccessible.c @@ -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 diff --git a/gtk/a11y/gtktreeviewaccessible.c b/gtk/a11y/gtktreeviewaccessible.c index 095a700b7d..efb9c9bc53 100644 --- a/gtk/a11y/gtktreeviewaccessible.c +++ b/gtk/a11y/gtktreeviewaccessible.c @@ -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 -- cgit v1.2.1