Merge lp:~ted/libdbusmenu/take-unref into lp:libdbusmenu/0.5

Proposed by Ted Gould
Status: Merged
Merged at revision: 207
Proposed branch: lp:~ted/libdbusmenu/take-unref
Merge into: lp:libdbusmenu/0.5
Diff against target: 21 lines (+2/-2)
1 file modified
libdbusmenu-glib/menuitem.c (+2/-2)
To merge this branch: bzr merge lp:~ted/libdbusmenu/take-unref
Reviewer Review Type Date Requested Status
Cody Russell (community) Approve
Review via email: mp+48629@code.launchpad.net

Description of the change

take_children() shouldn't unref as the caller wouldn't get a chance to use the items if this was the last ref.

To post a comment you must log in.
Revision history for this message
Cody Russell (bratsche) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libdbusmenu-glib/menuitem.c'
2--- libdbusmenu-glib/menuitem.c 2011-01-21 19:27:26 +0000
3+++ libdbusmenu-glib/menuitem.c 2011-02-04 17:04:53 +0000
4@@ -547,7 +547,6 @@
5 g_debug("Menuitem %d (%s) signalling child removed %d (%s)", ID(user_data), LABEL(user_data), ID(data), LABEL(data));
6 #endif
7 g_signal_emit(G_OBJECT(user_data), signals[CHILD_REMOVED], 0, DBUSMENU_MENUITEM(data), TRUE);
8- g_object_unref(G_OBJECT(data));
9 return;
10 }
11
12@@ -561,7 +560,8 @@
13 on the children it has taken. A lot of responsibility involved
14 in taking children.
15
16- Return value: A #GList of pointers to #DbusmenuMenuitem objects.
17+ Return value: (transfer full) (array) (element-type Dbusmenu.Menuitem)
18+ A #GList of pointers to #DbusmenuMenuitem objects.
19 */
20 GList *
21 dbusmenu_menuitem_take_children (DbusmenuMenuitem * mi)

Subscribers

People subscribed via source and target branches