From 3548a02da37917e95564dfda60e97870274a53fa Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 4 Feb 2011 11:00:07 -0600 Subject: take_children() shouldn't unref the items as they might get deleted before the caller would be abel to use them. Making sure to put those annotations in the docs. --- libdbusmenu-glib/menuitem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libdbusmenu-glib/menuitem.c b/libdbusmenu-glib/menuitem.c index b40195c..159463b 100644 --- a/libdbusmenu-glib/menuitem.c +++ b/libdbusmenu-glib/menuitem.c @@ -547,7 +547,6 @@ take_children_signal (gpointer data, gpointer user_data) g_debug("Menuitem %d (%s) signalling child removed %d (%s)", ID(user_data), LABEL(user_data), ID(data), LABEL(data)); #endif g_signal_emit(G_OBJECT(user_data), signals[CHILD_REMOVED], 0, DBUSMENU_MENUITEM(data), TRUE); - g_object_unref(G_OBJECT(data)); return; } @@ -561,7 +560,8 @@ take_children_signal (gpointer data, gpointer user_data) on the children it has taken. A lot of responsibility involved in taking children. - Return value: A #GList of pointers to #DbusmenuMenuitem objects. + Return value: (transfer full) (array) (element-type Dbusmenu.Menuitem) + A #GList of pointers to #DbusmenuMenuitem objects. */ GList * dbusmenu_menuitem_take_children (DbusmenuMenuitem * mi) -- cgit v1.2.3