summaryrefslogtreecommitdiffstats
path: root/dbus/dbus-object-tree.c
diff options
context:
space:
mode:
authorMikael Hallendal <micke@imendio.com>2003-11-27 01:25:50 +0000
committerMikael Hallendal <micke@imendio.com>2003-11-27 01:25:50 +0000
commit9f1a60dbba69844c0a04b3dd86280352736187ce (patch)
treeb50747f9d3b395ba92bd37109504626813f03802 /dbus/dbus-object-tree.c
parent6d9f72b9e651d90fcbd191b43b5e91ba7bd63789 (diff)
2003-11-26 Mikael Hallendal <micke@imendio.com>
* bus/*.[ch]: * dbus/*.[ch]: * glib/*.[ch]: Made ref functions return the pointer
Diffstat (limited to 'dbus/dbus-object-tree.c')
-rw-r--r--dbus/dbus-object-tree.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/dbus/dbus-object-tree.c b/dbus/dbus-object-tree.c
index 07d3ae59..09049195 100644
--- a/dbus/dbus-object-tree.c
+++ b/dbus/dbus-object-tree.c
@@ -46,7 +46,7 @@ typedef struct DBusObjectSubtree DBusObjectSubtree;
static DBusObjectSubtree* _dbus_object_subtree_new (const char *name,
const DBusObjectPathVTable *vtable,
void *user_data);
-static void _dbus_object_subtree_ref (DBusObjectSubtree *subtree);
+static DBusObjectSubtree* _dbus_object_subtree_ref (DBusObjectSubtree *subtree);
static void _dbus_object_subtree_unref (DBusObjectSubtree *subtree);
/**
@@ -121,13 +121,16 @@ _dbus_object_tree_new (DBusConnection *connection)
/**
* Increment the reference count
* @param tree the object tree
+ * @returns the object tree
*/
-void
+DBusObjectTree *
_dbus_object_tree_ref (DBusObjectTree *tree)
{
_dbus_assert (tree->refcount > 0);
tree->refcount += 1;
+
+ return tree;
}
/**
@@ -859,11 +862,13 @@ _dbus_object_subtree_new (const char *name,
return NULL;
}
-static void
+static DBusObjectSubtree *
_dbus_object_subtree_ref (DBusObjectSubtree *subtree)
{
_dbus_assert (subtree->refcount.value > 0);
_dbus_atomic_inc (&subtree->refcount);
+
+ return subtree;
}
static void