summaryrefslogtreecommitdiffstats
path: root/dbus/dbus-message.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-message.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-message.c')
-rw-r--r--dbus/dbus-message.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/dbus/dbus-message.c b/dbus/dbus-message.c
index 50f3107c..2e4ef0be 100644
--- a/dbus/dbus-message.c
+++ b/dbus/dbus-message.c
@@ -1504,17 +1504,20 @@ dbus_message_copy (const DBusMessage *message)
* Increments the reference count of a DBusMessage.
*
* @param message The message
+ * @returns the message
* @see dbus_message_unref
*/
-void
+DBusMessage *
dbus_message_ref (DBusMessage *message)
{
dbus_int32_t old_refcount;
- _dbus_return_if_fail (message != NULL);
+ _dbus_return_val_if_fail (message != NULL, NULL);
old_refcount = _dbus_atomic_inc (&message->refcount);
_dbus_assert (old_refcount >= 1);
+
+ return message;
}
static void
@@ -4781,11 +4784,14 @@ _dbus_message_loader_new (void)
* Increments the reference count of the loader.
*
* @param loader the loader.
+ * @returns the loader
*/
-void
+DBusMessageLoader *
_dbus_message_loader_ref (DBusMessageLoader *loader)
{
loader->refcount += 1;
+
+ return loader;
}
/**