Bug in the boxing of DBusMessage in Glib layer
Mikael Hallendal
micke@imendio.com
Wed, 26 Nov 2003 11:35:10 +0100
--=-WnuRFg0Sci+c8D6sLmHI
Content-Type: text/plain; charset=iso-8859-15
Content-Transfer-Encoding: quoted-printable
l=F6r 2003-11-22 klockan 18.38 skrev Havoc Pennington:
> On Fri, 2003-11-21 at 06:45, Mikael Hallendal wrote:
> > So I started on a patch that would make the dbus_*_ref() functions
> > return the reffed pointer but then I thought I should ask first if it
> > doesn't return the reffed pointer for a reason.
>=20
> No reason, just ignorance. I'd say make _ref() return a pointer.
Patch that make all (I hope) _ref() functions return the pointer.
Not sure if I still have a cvs account there (how would I apply for
one?)
Regards,
Mikael Hallendal
--=20
Mikael Hallendal micke@imendio.com
Imendio HB http://www.imendio.com
Phone: +46 (0)709 718 918
--=-WnuRFg0Sci+c8D6sLmHI
Content-Disposition: attachment; filename=ref-return-pointer.patch
Content-Type: text/x-patch; name=ref-return-pointer.patch; charset=iso-8859-15
Content-Transfer-Encoding: 7bit
? Doxyfile
? Makefile
? Makefile.in
? aclocal.m4
? autom4te.cache
? config.guess
? config.h
? config.h.in
? config.log
? config.status
? config.sub
? configure
? dbus-1.pc
? dbus-glib-1.pc
? libtool
? ltmain.sh
? stamp-h1
? python/.deps
? python/.libs
? python/Makefile
? python/Makefile.in
? python/dbus_bindings.c
? python/dbus_bindings.la
? python/dbus_bindings.lo
? python/dbus_bindings.pyx
? test/glib/.deps
? test/glib/.libs
? test/glib/Makefile
? test/glib/Makefile.in
? test/glib/test-dbus-glib
? test/glib/test-profile
? test/glib/test-service-glib
? test/glib/test-thread-client
? test/glib/test-thread-server
? tools/dbus-viewer
Index: ChangeLog
===================================================================
RCS file: /cvs/dbus/dbus/ChangeLog,v
retrieving revision 1.442
diff -u -b -B -p -r1.442 ChangeLog
--- ChangeLog 25 Nov 2003 15:30:03 -0000 1.442
+++ ChangeLog 26 Nov 2003 10:20:13 -0000
@@ -1,3 +1,9 @@
+2003-11-26 Mikael Hallendal <micke@imendio.com>
+
+ * bus/*.[ch]:
+ * dbus/*.[ch]:
+ * glib/*.[ch]: Made ref functions return the pointer
+
2003-11-25 Zack Rusin <zack@kde.org>
* qt/integrator.h, qt/integrator.cpp: Adding handling of DBusServer,
Index: bus/activation.c
===================================================================
RCS file: /cvs/dbus/dbus/bus/activation.c,v
retrieving revision 1.29
diff -u -b -B -p -r1.29 activation.c
--- bus/activation.c 16 Oct 2003 06:34:51 -0000 1.29
+++ bus/activation.c 26 Nov 2003 10:20:13 -0000
@@ -99,11 +99,13 @@ handle_timeout_callback (DBusTimeout *
_dbus_wait_for_memory ();
}
-static void
+static BusPendingActivation *
bus_pending_activation_ref (BusPendingActivation *pending_activation)
{
_dbus_assert (pending_activation->refcount > 0);
pending_activation->refcount += 1;
+
+ return pending_activation;
}
static void
@@ -445,12 +447,14 @@ bus_activation_new (BusContext *c
return NULL;
}
-void
+BusActivation *
bus_activation_ref (BusActivation *activation)
{
_dbus_assert (activation->refcount > 0);
activation->refcount += 1;
+
+ return activation;
}
void
Index: bus/activation.h
===================================================================
RCS file: /cvs/dbus/dbus/bus/activation.h,v
retrieving revision 1.9
diff -u -b -B -p -r1.9 activation.h
--- bus/activation.h 2 Apr 2003 20:14:52 -0000 1.9
+++ bus/activation.h 26 Nov 2003 10:20:13 -0000
@@ -32,7 +32,7 @@ BusActivation* bus_activation_new
const DBusString *address,
DBusList **directories,
DBusError *error);
-void bus_activation_ref (BusActivation *activation);
+BusActivation* bus_activation_ref (BusActivation *activation);
void bus_activation_unref (BusActivation *activation);
dbus_bool_t bus_activation_activate_service (BusActivation *activation,
DBusConnection *connection,
Index: bus/bus.c
===================================================================
RCS file: /cvs/dbus/dbus/bus/bus.c,v
retrieving revision 1.46
diff -u -b -B -p -r1.46 bus.c
--- bus/bus.c 22 Oct 2003 16:01:08 -0000 1.46
+++ bus/bus.c 26 Nov 2003 10:20:13 -0000
@@ -670,11 +670,13 @@ bus_context_shutdown (BusContext *conte
}
}
-void
+BusContext *
bus_context_ref (BusContext *context)
{
_dbus_assert (context->refcount > 0);
context->refcount += 1;
+
+ return context;
}
void
Index: bus/bus.h
===================================================================
RCS file: /cvs/dbus/dbus/bus/bus.h,v
retrieving revision 1.20
diff -u -b -B -p -r1.20 bus.h
--- bus/bus.h 14 Oct 2003 05:16:56 -0000 1.20
+++ bus/bus.h 26 Nov 2003 10:20:13 -0000
@@ -66,7 +66,7 @@ BusContext* bus_context_new
int print_pid_fd,
DBusError *error);
void bus_context_shutdown (BusContext *context);
-void bus_context_ref (BusContext *context);
+BusContext* bus_context_ref (BusContext *context);
void bus_context_unref (BusContext *context);
const char* bus_context_get_type (BusContext *context);
const char* bus_context_get_address (BusContext *context);
Index: bus/config-parser.c
===================================================================
RCS file: /cvs/dbus/dbus/bus/config-parser.c,v
retrieving revision 1.25
diff -u -b -B -p -r1.25 config-parser.c
--- bus/config-parser.c 14 Oct 2003 22:16:03 -0000 1.25
+++ bus/config-parser.c 26 Nov 2003 10:20:14 -0000
@@ -345,12 +345,14 @@ bus_config_parser_new (const DBusString
return parser;
}
-void
+BusConfigParser *
bus_config_parser_ref (BusConfigParser *parser)
{
_dbus_assert (parser->refcount > 0);
parser->refcount += 1;
+
+ return parser;
}
void
Index: bus/config-parser.h
===================================================================
RCS file: /cvs/dbus/dbus/bus/config-parser.h,v
retrieving revision 1.11
diff -u -b -B -p -r1.11 config-parser.h
--- bus/config-parser.h 28 Apr 2003 19:29:41 -0000 1.11
+++ bus/config-parser.h 26 Nov 2003 10:20:14 -0000
@@ -37,7 +37,7 @@ typedef struct BusConfigParser BusConfig
BusConfigParser* bus_config_parser_new (const DBusString *basedir,
dbus_bool_t is_toplevel);
-void bus_config_parser_ref (BusConfigParser *parser);
+BusConfigParser* bus_config_parser_ref (BusConfigParser *parser);
void bus_config_parser_unref (BusConfigParser *parser);
dbus_bool_t bus_config_parser_check_doctype (BusConfigParser *parser,
const char *doctype,
Index: bus/connection.c
===================================================================
RCS file: /cvs/dbus/dbus/bus/connection.c,v
retrieving revision 1.51
diff -u -b -B -p -r1.51 connection.c
--- bus/connection.c 28 Oct 2003 23:51:24 -0000 1.51
+++ bus/connection.c 26 Nov 2003 10:20:14 -0000
@@ -471,11 +471,13 @@ bus_connections_new (BusContext *context
return NULL;
}
-void
+BusConnections *
bus_connections_ref (BusConnections *connections)
{
_dbus_assert (connections->refcount > 0);
connections->refcount += 1;
+
+ return connections;
}
void
Index: bus/connection.h
===================================================================
RCS file: /cvs/dbus/dbus/bus/connection.h,v
retrieving revision 1.17
diff -u -b -B -p -r1.17 connection.h
--- bus/connection.h 14 Oct 2003 05:16:56 -0000 1.17
+++ bus/connection.h 26 Nov 2003 10:20:14 -0000
@@ -33,7 +33,7 @@ typedef dbus_bool_t (* BusConnectionFore
BusConnections* bus_connections_new (BusContext *context);
-void bus_connections_ref (BusConnections *connections);
+BusConnections* bus_connections_ref (BusConnections *connections);
void bus_connections_unref (BusConnections *connections);
dbus_bool_t bus_connections_setup_connection (BusConnections *connections,
DBusConnection *connection);
Index: bus/policy.c
===================================================================
RCS file: /cvs/dbus/dbus/bus/policy.c,v
retrieving revision 1.16
diff -u -b -B -p -r1.16 policy.c
--- bus/policy.c 14 Oct 2003 22:16:03 -0000 1.16
+++ bus/policy.c 26 Nov 2003 10:20:14 -0000
@@ -68,12 +68,14 @@ bus_policy_rule_new (BusPolicyRuleType t
return rule;
}
-void
+BusPolicyRule *
bus_policy_rule_ref (BusPolicyRule *rule)
{
_dbus_assert (rule->refcount > 0);
rule->refcount += 1;
+
+ return rule;
}
void
@@ -178,12 +180,14 @@ bus_policy_new (void)
return NULL;
}
-void
+BusPolicy *
bus_policy_ref (BusPolicy *policy)
{
_dbus_assert (policy->refcount > 0);
policy->refcount += 1;
+
+ return policy;
}
void
@@ -628,12 +632,14 @@ bus_client_policy_new (void)
return policy;
}
-void
+BusClientPolicy *
bus_client_policy_ref (BusClientPolicy *policy)
{
_dbus_assert (policy->refcount > 0);
policy->refcount += 1;
+
+ return policy;
}
static void
Index: bus/policy.h
===================================================================
RCS file: /cvs/dbus/dbus/bus/policy.h,v
retrieving revision 1.11
diff -u -b -B -p -r1.11 policy.h
--- bus/policy.h 14 Oct 2003 22:16:03 -0000 1.11
+++ bus/policy.h 26 Nov 2003 10:20:14 -0000
@@ -101,11 +101,11 @@ struct BusPolicyRule
BusPolicyRule* bus_policy_rule_new (BusPolicyRuleType type,
dbus_bool_t allow);
-void bus_policy_rule_ref (BusPolicyRule *rule);
+BusPolicyRule* bus_policy_rule_ref (BusPolicyRule *rule);
void bus_policy_rule_unref (BusPolicyRule *rule);
BusPolicy* bus_policy_new (void);
-void bus_policy_ref (BusPolicy *policy);
+BusPolicy* bus_policy_ref (BusPolicy *policy);
void bus_policy_unref (BusPolicy *policy);
BusClientPolicy* bus_policy_create_client_policy (BusPolicy *policy,
DBusConnection *connection,
@@ -127,7 +127,7 @@ dbus_bool_t bus_policy_merge
BusPolicy *to_absorb);
BusClientPolicy* bus_client_policy_new (void);
-void bus_client_policy_ref (BusClientPolicy *policy);
+BusClientPolicy* bus_client_policy_ref (BusClientPolicy *policy);
void bus_client_policy_unref (BusClientPolicy *policy);
dbus_bool_t bus_client_policy_check_can_send (BusClientPolicy *policy,
BusRegistry *registry,
Index: bus/services.c
===================================================================
RCS file: /cvs/dbus/dbus/bus/services.c,v
retrieving revision 1.16
diff -u -b -B -p -r1.16 services.c
--- bus/services.c 30 Sep 2003 02:32:50 -0000 1.16
+++ bus/services.c 26 Nov 2003 10:20:14 -0000
@@ -82,11 +82,13 @@ bus_registry_new (BusContext *context)
return NULL;
}
-void
+BusRegistry *
bus_registry_ref (BusRegistry *registry)
{
_dbus_assert (registry->refcount > 0);
registry->refcount += 1;
+
+ return registry;
}
void
@@ -713,12 +715,14 @@ bus_service_remove_owner (BusService
return TRUE;
}
-void
+BusService *
bus_service_ref (BusService *service)
{
_dbus_assert (service->refcount > 0);
service->refcount += 1;
+
+ return service;
}
void
Index: bus/services.h
===================================================================
RCS file: /cvs/dbus/dbus/bus/services.h,v
retrieving revision 1.8
diff -u -b -B -p -r1.8 services.h
--- bus/services.h 11 Apr 2003 00:03:06 -0000 1.8
+++ bus/services.h 26 Nov 2003 10:20:14 -0000
@@ -33,7 +33,7 @@ typedef void (* BusServiceForeachFunctio
void *data);
BusRegistry* bus_registry_new (BusContext *context);
-void bus_registry_ref (BusRegistry *registry);
+BusRegistry* bus_registry_ref (BusRegistry *registry);
void bus_registry_unref (BusRegistry *registry);
BusService* bus_registry_lookup (BusRegistry *registry,
const DBusString *service_name);
@@ -56,7 +56,7 @@ dbus_bool_t bus_registry_acquire_servic
BusTransaction *transaction,
DBusError *error);
-void bus_service_ref (BusService *service);
+BusService* bus_service_ref (BusService *service);
void bus_service_unref (BusService *service);
dbus_bool_t bus_service_add_owner (BusService *service,
DBusConnection *owner,
Index: bus/signals.c
===================================================================
RCS file: /cvs/dbus/dbus/bus/signals.c,v
retrieving revision 1.5
diff -u -b -B -p -r1.5 signals.c
--- bus/signals.c 16 Oct 2003 06:34:51 -0000 1.5
+++ bus/signals.c 26 Nov 2003 10:20:15 -0000
@@ -59,12 +59,14 @@ bus_match_rule_new (DBusConnection *matc
return rule;
}
-void
+BusMatchRule *
bus_match_rule_ref (BusMatchRule *rule)
{
_dbus_assert (rule->refcount > 0);
rule->refcount += 1;
+
+ return rule;
}
void
@@ -765,12 +767,14 @@ bus_matchmaker_new (void)
return matchmaker;
}
-void
+BusMatchmaker *
bus_matchmaker_ref (BusMatchmaker *matchmaker)
{
_dbus_assert (matchmaker->refcount > 0);
matchmaker->refcount += 1;
+
+ return matchmaker;
}
void
Index: bus/signals.h
===================================================================
RCS file: /cvs/dbus/dbus/bus/signals.h,v
retrieving revision 1.2
diff -u -b -B -p -r1.2 signals.h
--- bus/signals.h 30 Sep 2003 02:32:50 -0000 1.2
+++ bus/signals.h 26 Nov 2003 10:20:15 -0000
@@ -40,7 +40,7 @@ typedef enum
} BusMatchFlags;
BusMatchRule* bus_match_rule_new (DBusConnection *matches_go_to);
-void bus_match_rule_ref (BusMatchRule *rule);
+BusMatchRule* bus_match_rule_ref (BusMatchRule *rule);
void bus_match_rule_unref (BusMatchRule *rule);
dbus_bool_t bus_match_rule_set_message_type (BusMatchRule *rule,
@@ -61,7 +61,7 @@ BusMatchRule* bus_match_rule_parse (DBus
DBusError *error);
BusMatchmaker* bus_matchmaker_new (void);
-void bus_matchmaker_ref (BusMatchmaker *matchmaker);
+BusMatchmaker* bus_matchmaker_ref (BusMatchmaker *matchmaker);
void bus_matchmaker_unref (BusMatchmaker *matchmaker);
dbus_bool_t bus_matchmaker_add_rule (BusMatchmaker *matchmaker,
Index: dbus/dbus-auth.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-auth.c,v
retrieving revision 1.29
diff -u -b -B -p -r1.29 dbus-auth.c
--- dbus/dbus-auth.c 30 Sep 2003 02:32:52 -0000 1.29
+++ dbus/dbus-auth.c 26 Nov 2003 10:20:15 -0000
@@ -1894,13 +1894,16 @@ _dbus_auth_client_new (void)
* Increments the refcount of an auth object.
*
* @param auth the auth conversation
+ * @returns the auth conversation
*/
-void
+DBusAuth *
_dbus_auth_ref (DBusAuth *auth)
{
_dbus_assert (auth != NULL);
auth->refcount += 1;
+
+ return auth;
}
/**
Index: dbus/dbus-auth.h
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-auth.h,v
retrieving revision 1.6
diff -u -b -B -p -r1.6 dbus-auth.h
--- dbus/dbus-auth.h 1 Apr 2003 05:33:01 -0000 1.6
+++ dbus/dbus-auth.h 26 Nov 2003 10:20:15 -0000
@@ -44,7 +44,7 @@ typedef enum
DBusAuth* _dbus_auth_server_new (void);
DBusAuth* _dbus_auth_client_new (void);
-void _dbus_auth_ref (DBusAuth *auth);
+DBusAuth* _dbus_auth_ref (DBusAuth *auth);
void _dbus_auth_unref (DBusAuth *auth);
dbus_bool_t _dbus_auth_set_mechanisms (DBusAuth *auth,
const char **mechanisms);
Index: dbus/dbus-connection-internal.h
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-connection-internal.h,v
retrieving revision 1.14
diff -u -b -B -p -r1.14 dbus-connection-internal.h
--- dbus/dbus-connection-internal.h 26 Oct 2003 15:36:15 -0000 1.14
+++ dbus/dbus-connection-internal.h 26 Nov 2003 10:20:15 -0000
@@ -46,7 +46,7 @@ typedef enum
void _dbus_connection_lock (DBusConnection *connection);
void _dbus_connection_unlock (DBusConnection *connection);
-void _dbus_connection_ref_unlocked (DBusConnection *connection);
+DBusConnection * _dbus_connection_ref_unlocked (DBusConnection *connection);
void _dbus_connection_unref_unlocked (DBusConnection *connection);
dbus_bool_t _dbus_connection_queue_received_message (DBusConnection *connection,
DBusMessage *message);
Index: dbus/dbus-connection.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-connection.c,v
retrieving revision 1.73
diff -u -b -B -p -r1.73 dbus-connection.c
--- dbus/dbus-connection.c 26 Oct 2003 15:36:15 -0000 1.73
+++ dbus/dbus-connection.c 26 Nov 2003 10:20:16 -0000
@@ -219,11 +219,13 @@ static void _dbus_connecti
DBusDispatchStatus new_status);
static void _dbus_connection_last_unref (DBusConnection *connection);
-static void
+static DBusMessageFilter *
_dbus_message_filter_ref (DBusMessageFilter *filter)
{
_dbus_assert (filter->refcount.value > 0);
_dbus_atomic_inc (&filter->refcount);
+
+ return filter;
}
static void
@@ -963,8 +965,9 @@ _dbus_connection_new_for_transport (DBus
* Requires that the caller already holds the connection lock.
*
* @param connection the connection.
+ * @returns the connection.
*/
-void
+DBusConnection *
_dbus_connection_ref_unlocked (DBusConnection *connection)
{
#ifdef DBUS_HAVE_ATOMIC_INT
@@ -973,6 +976,8 @@ _dbus_connection_ref_unlocked (DBusConne
_dbus_assert (connection->refcount.value > 0);
connection->refcount.value += 1;
#endif
+
+ return connection;
}
/**
@@ -1117,11 +1122,12 @@ dbus_connection_open (const char *ad
* Increments the reference count of a DBusConnection.
*
* @param connection the connection.
+ * @returns the connection.
*/
-void
+DBusConnection *
dbus_connection_ref (DBusConnection *connection)
{
- _dbus_return_if_fail (connection != NULL);
+ _dbus_return_val_if_fail (connection != NULL, NULL);
/* The connection lock is better than the global
* lock in the atomic increment fallback
@@ -1136,6 +1142,8 @@ dbus_connection_ref (DBusConnection *con
connection->refcount.value += 1;
CONNECTION_UNLOCK (connection);
#endif
+
+ return connection;
}
static void
Index: dbus/dbus-connection.h
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-connection.h,v
retrieving revision 1.25
diff -u -b -B -p -r1.25 dbus-connection.h
--- dbus/dbus-connection.h 30 Sep 2003 02:32:52 -0000 1.25
+++ dbus/dbus-connection.h 26 Nov 2003 10:20:16 -0000
@@ -95,7 +95,7 @@ typedef DBusHandlerResult (* DBusHandleM
DBusConnection* dbus_connection_open (const char *address,
DBusError *error);
-void dbus_connection_ref (DBusConnection *connection);
+DBusConnection* dbus_connection_ref (DBusConnection *connection);
void dbus_connection_unref (DBusConnection *connection);
void dbus_connection_disconnect (DBusConnection *connection);
dbus_bool_t dbus_connection_get_is_connected (DBusConnection *connection);
Index: dbus/dbus-hash.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-hash.c,v
retrieving revision 1.15
diff -u -b -B -p -r1.15 dbus-hash.c
--- dbus/dbus-hash.c 30 Sep 2003 02:32:52 -0000 1.15
+++ dbus/dbus-hash.c 26 Nov 2003 10:20:16 -0000
@@ -348,11 +348,14 @@ _dbus_hash_table_new (DBusHashType t
* Increments the reference count for a hash table.
*
* @param table the hash table to add a reference to.
+ * @returns the hash table.
*/
-void
+DBusHashTable *
_dbus_hash_table_ref (DBusHashTable *table)
{
table->refcount += 1;
+
+ return table;
}
/**
Index: dbus/dbus-hash.h
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-hash.h,v
retrieving revision 1.10
diff -u -b -B -p -r1.10 dbus-hash.h
--- dbus/dbus-hash.h 30 Sep 2003 02:32:52 -0000 1.10
+++ dbus/dbus-hash.h 26 Nov 2003 10:20:16 -0000
@@ -61,7 +61,7 @@ typedef enum
DBusHashTable* _dbus_hash_table_new (DBusHashType type,
DBusFreeFunction key_free_function,
DBusFreeFunction value_free_function);
-void _dbus_hash_table_ref (DBusHashTable *table);
+DBusHashTable* _dbus_hash_table_ref (DBusHashTable *table);
void _dbus_hash_table_unref (DBusHashTable *table);
void _dbus_hash_iter_init (DBusHashTable *table,
DBusHashIter *iter);
Index: dbus/dbus-keyring.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-keyring.c,v
retrieving revision 1.19
diff -u -b -B -p -r1.19 dbus-keyring.c
--- dbus/dbus-keyring.c 30 Sep 2003 02:32:52 -0000 1.19
+++ dbus/dbus-keyring.c 26 Nov 2003 10:20:16 -0000
@@ -657,11 +657,14 @@ _dbus_keyring_reload (DBusKeyring *keyri
* Increments reference count of the keyring
*
* @param keyring the keyring
+ * @returns the keyring
*/
-void
+DBusKeyring *
_dbus_keyring_ref (DBusKeyring *keyring)
{
keyring->refcount += 1;
+
+ return keyring;
}
/**
Index: dbus/dbus-keyring.h
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-keyring.h,v
retrieving revision 1.4
diff -u -b -B -p -r1.4 dbus-keyring.h
--- dbus/dbus-keyring.h 5 Mar 2003 02:01:34 -0000 1.4
+++ dbus/dbus-keyring.h 26 Nov 2003 10:20:16 -0000
@@ -34,7 +34,7 @@ typedef struct DBusKeyring DBusKeyring;
DBusKeyring* _dbus_keyring_new_homedir (const DBusString *username,
const DBusString *context,
DBusError *error);
-void _dbus_keyring_ref (DBusKeyring *keyring);
+DBusKeyring* _dbus_keyring_ref (DBusKeyring *keyring);
void _dbus_keyring_unref (DBusKeyring *keyring);
dbus_bool_t _dbus_keyring_validate_context (const DBusString *context);
int _dbus_keyring_get_best_key (DBusKeyring *keyring,
Index: dbus/dbus-mainloop.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-mainloop.c,v
retrieving revision 1.13
diff -u -b -B -p -r1.13 dbus-mainloop.c
--- dbus/dbus-mainloop.c 30 Sep 2003 02:32:52 -0000 1.13
+++ dbus/dbus-mainloop.c 26 Nov 2003 10:20:16 -0000
@@ -123,12 +123,14 @@ timeout_callback_new (DBusTimeout
return cb;
}
-static void
+static Callback *
callback_ref (Callback *cb)
{
_dbus_assert (cb->refcount > 0);
cb->refcount += 1;
+
+ return cb;
}
static void
@@ -204,13 +206,15 @@ _dbus_loop_new (void)
return loop;
}
-void
+DBusLoop *
_dbus_loop_ref (DBusLoop *loop)
{
_dbus_assert (loop != NULL);
_dbus_assert (loop->refcount > 0);
loop->refcount += 1;
+
+ return loop;
}
void
Index: dbus/dbus-mainloop.h
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-mainloop.h,v
retrieving revision 1.4
diff -u -b -B -p -r1.4 dbus-mainloop.h
--- dbus/dbus-mainloop.h 30 Sep 2003 02:32:52 -0000 1.4
+++ dbus/dbus-mainloop.h 26 Nov 2003 10:20:16 -0000
@@ -37,7 +37,7 @@ typedef void (* DBusTimeoutFuncti
void *data);
DBusLoop* _dbus_loop_new (void);
-void _dbus_loop_ref (DBusLoop *loop);
+DBusLoop* _dbus_loop_ref (DBusLoop *loop);
void _dbus_loop_unref (DBusLoop *loop);
dbus_bool_t _dbus_loop_add_watch (DBusLoop *loop,
DBusWatch *watch,
Index: dbus/dbus-message-handler.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-message-handler.c,v
retrieving revision 1.9
diff -u -b -B -p -r1.9 dbus-message-handler.c
--- dbus/dbus-message-handler.c 12 May 2003 02:44:44 -0000 1.9
+++ dbus/dbus-message-handler.c 26 Nov 2003 10:20:17 -0000
@@ -189,13 +189,16 @@ dbus_message_handler_new (DBusHandleMess
* Increments the reference count on a message handler.
*
* @param handler the handler
+ * @returns the handler
*/
-void
+DBusMessageHandler *
dbus_message_handler_ref (DBusMessageHandler *handler)
{
_dbus_return_if_fail (handler != NULL);
_dbus_atomic_inc (&handler->refcount);
+
+ return handler;
}
/**
Index: dbus/dbus-message-handler.h
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-message-handler.h,v
retrieving revision 1.1
diff -u -b -B -p -r1.1 dbus-message-handler.h
--- dbus/dbus-message-handler.h 24 Dec 2002 06:37:32 -0000 1.1
+++ dbus/dbus-message-handler.h 26 Nov 2003 10:20:17 -0000
@@ -43,7 +43,7 @@ DBusMessageHandler* dbus_message_handler
DBusFreeFunction free_user_data);
-void dbus_message_handler_ref (DBusMessageHandler *handler);
+DBusMessageHandler* dbus_message_handler_ref (DBusMessageHandler *handler);
void dbus_message_handler_unref (DBusMessageHandler *handler);
Index: dbus/dbus-message-internal.h
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-message-internal.h,v
retrieving revision 1.14
diff -u -b -B -p -r1.14 dbus-message-internal.h
--- dbus/dbus-message-internal.h 12 May 2003 02:44:44 -0000 1.14
+++ dbus/dbus-message-internal.h 26 Nov 2003 10:20:17 -0000
@@ -48,7 +48,7 @@ void _dbus_message_remove_size_co
DBusList **link_return);
DBusMessageLoader* _dbus_message_loader_new (void);
-void _dbus_message_loader_ref (DBusMessageLoader *loader);
+DBusMessageLoader* _dbus_message_loader_ref (DBusMessageLoader *loader);
void _dbus_message_loader_unref (DBusMessageLoader *loader);
void _dbus_message_loader_get_buffer (DBusMessageLoader *loader,
Index: dbus/dbus-message.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-message.c,v
retrieving revision 1.114
diff -u -b -B -p -r1.114 dbus-message.c
--- dbus/dbus-message.c 29 Oct 2003 00:29:52 -0000 1.114
+++ dbus/dbus-message.c 26 Nov 2003 10:20:18 -0000
@@ -1504,17 +1504,20 @@ dbus_message_copy (const DBusMessage *me
* 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;
}
/**
Index: dbus/dbus-message.h
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-message.h,v
retrieving revision 1.47
diff -u -b -B -p -r1.47 dbus-message.h
--- dbus/dbus-message.h 21 Oct 2003 05:46:51 -0000 1.47
+++ dbus/dbus-message.h 26 Nov 2003 10:20:18 -0000
@@ -73,9 +73,9 @@ DBusMessage* dbus_message_new_error
const char *error_name,
const char *error_message);
-DBusMessage *dbus_message_copy (const DBusMessage *message);
+DBusMessage* dbus_message_copy (const DBusMessage *message);
-void dbus_message_ref (DBusMessage *message);
+DBusMessage* dbus_message_ref (DBusMessage *message);
void dbus_message_unref (DBusMessage *message);
int dbus_message_get_type (DBusMessage *message);
dbus_bool_t dbus_message_set_path (DBusMessage *message,
Index: dbus/dbus-object-tree.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-object-tree.c,v
retrieving revision 1.2
diff -u -b -B -p -r1.2 dbus-object-tree.c
--- dbus/dbus-object-tree.c 30 Sep 2003 02:32:53 -0000 1.2
+++ dbus/dbus-object-tree.c 26 Nov 2003 10:20:18 -0000
@@ -46,7 +46,7 @@ typedef struct DBusObjectSubtree DBusObj
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 *c
/**
* 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
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
Index: dbus/dbus-object-tree.h
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-object-tree.h,v
retrieving revision 1.2
diff -u -b -B -p -r1.2 dbus-object-tree.h
--- dbus/dbus-object-tree.h 30 Sep 2003 02:32:53 -0000 1.2
+++ dbus/dbus-object-tree.h 26 Nov 2003 10:20:18 -0000
@@ -30,7 +30,7 @@ DBUS_BEGIN_DECLS;
typedef struct DBusObjectTree DBusObjectTree;
DBusObjectTree* _dbus_object_tree_new (DBusConnection *connection);
-void _dbus_object_tree_ref (DBusObjectTree *tree);
+DBusObjectTree* _dbus_object_tree_ref (DBusObjectTree *tree);
void _dbus_object_tree_unref (DBusObjectTree *tree);
dbus_bool_t _dbus_object_tree_register (DBusObjectTree *tree,
Index: dbus/dbus-pending-call.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-pending-call.c,v
retrieving revision 1.4
diff -u -b -B -p -r1.4 dbus-pending-call.c
--- dbus/dbus-pending-call.c 16 Oct 2003 06:34:51 -0000 1.4
+++ dbus/dbus-pending-call.c 26 Nov 2003 10:20:18 -0000
@@ -138,13 +138,16 @@ _dbus_pending_call_notify (DBusPendingCa
* Increments the reference count on a pending call.
*
* @param pending the pending call object
+ * @returns the pending call object
*/
-void
+DBusPendingCall *
dbus_pending_call_ref (DBusPendingCall *pending)
{
_dbus_return_if_fail (pending != NULL);
_dbus_atomic_inc (&pending->refcount);
+
+ return pending;
}
/**
Index: dbus/dbus-pending-call.h
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-pending-call.h,v
retrieving revision 1.2
diff -u -b -B -p -r1.2 dbus-pending-call.h
--- dbus/dbus-pending-call.h 30 Sep 2003 02:32:53 -0000 1.2
+++ dbus/dbus-pending-call.h 26 Nov 2003 10:20:18 -0000
@@ -33,7 +33,7 @@
DBUS_BEGIN_DECLS;
-void dbus_pending_call_ref (DBusPendingCall *pending);
+DBusPendingCall* dbus_pending_call_ref (DBusPendingCall *pending);
void dbus_pending_call_unref (DBusPendingCall *pending);
dbus_bool_t dbus_pending_call_set_notify (DBusPendingCall *pending,
DBusPendingCallNotifyFunction function,
Index: dbus/dbus-resources.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-resources.c,v
retrieving revision 1.1
diff -u -b -B -p -r1.1 dbus-resources.c
--- dbus/dbus-resources.c 19 Jan 2003 03:33:35 -0000 1.1
+++ dbus/dbus-resources.c 26 Nov 2003 10:20:18 -0000
@@ -96,13 +96,16 @@ _dbus_counter_new (void)
* Increments refcount of the counter
*
* @param counter the counter
+ * @returns the counter
*/
-void
+DBusCounter *
_dbus_counter_ref (DBusCounter *counter)
{
_dbus_assert (counter->refcount > 0);
counter->refcount += 1;
+
+ return counter;
}
/**
Index: dbus/dbus-resources.h
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-resources.h,v
retrieving revision 1.1
diff -u -b -B -p -r1.1 dbus-resources.h
--- dbus/dbus-resources.h 19 Jan 2003 03:33:35 -0000 1.1
+++ dbus/dbus-resources.h 26 Nov 2003 10:20:18 -0000
@@ -35,7 +35,7 @@ typedef void (* DBusCounterNotifyFunctio
void *user_data);
DBusCounter* _dbus_counter_new (void);
-void _dbus_counter_ref (DBusCounter *counter);
+DBusCounter* _dbus_counter_ref (DBusCounter *counter);
void _dbus_counter_unref (DBusCounter *counter);
void _dbus_counter_adjust (DBusCounter *counter,
long delta);
Index: dbus/dbus-server.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-server.c,v
retrieving revision 1.30
diff -u -b -B -p -r1.30 dbus-server.c
--- dbus/dbus-server.c 30 Sep 2003 02:32:53 -0000 1.30
+++ dbus/dbus-server.c 26 Nov 2003 10:20:18 -0000
@@ -450,13 +450,16 @@ dbus_server_listen (const char *addr
* Increments the reference count of a DBusServer.
*
* @param server the server.
+ * @returns the server
*/
-void
+DBusServer *
dbus_server_ref (DBusServer *server)
{
_dbus_return_if_fail (server != NULL);
server->refcount += 1;
+
+ return server;
}
/**
Index: dbus/dbus-server.h
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-server.h,v
retrieving revision 1.13
diff -u -b -B -p -r1.13 dbus-server.h
--- dbus/dbus-server.h 22 Jun 2003 19:39:47 -0000 1.13
+++ dbus/dbus-server.h 26 Nov 2003 10:20:18 -0000
@@ -41,7 +41,7 @@ typedef void (* DBusNewConnectionFunctio
DBusServer* dbus_server_listen (const char *address,
DBusError *error);
-void dbus_server_ref (DBusServer *server);
+DBusServer* dbus_server_ref (DBusServer *server);
void dbus_server_unref (DBusServer *server);
void dbus_server_disconnect (DBusServer *server);
dbus_bool_t dbus_server_get_is_connected (DBusServer *server);
Index: dbus/dbus-spawn.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-spawn.c,v
retrieving revision 1.13
diff -u -b -B -p -r1.13 dbus-spawn.c
--- dbus/dbus-spawn.c 30 Sep 2003 02:32:53 -0000 1.13
+++ dbus/dbus-spawn.c 26 Nov 2003 10:20:18 -0000
@@ -235,14 +235,17 @@ _dbus_babysitter_new (void)
* Increment the reference count on the babysitter object.
*
* @param sitter the babysitter
+ * @returns the babysitter
*/
-void
+DBusBabysitter *
_dbus_babysitter_ref (DBusBabysitter *sitter)
{
_dbus_assert (sitter != NULL);
_dbus_assert (sitter->refcount > 0);
sitter->refcount += 1;
+
+ return sitter;
}
/**
Index: dbus/dbus-spawn.h
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-spawn.h,v
retrieving revision 1.3
diff -u -b -B -p -r1.3 dbus-spawn.h
--- dbus/dbus-spawn.h 18 Apr 2003 04:18:57 -0000 1.3
+++ dbus/dbus-spawn.h 26 Nov 2003 10:20:18 -0000
@@ -40,7 +40,7 @@ dbus_bool_t _dbus_spawn_async_with_babys
DBusSpawnChildSetupFunc child_setup,
void *user_data,
DBusError *error);
-void _dbus_babysitter_ref (DBusBabysitter *sitter);
+DBusBabysitter* _dbus_babysitter_ref (DBusBabysitter *sitter);
void _dbus_babysitter_unref (DBusBabysitter *sitter);
void _dbus_babysitter_kill_child (DBusBabysitter *sitter);
dbus_bool_t _dbus_babysitter_get_child_exited (DBusBabysitter *sitter);
Index: dbus/dbus-timeout.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-timeout.c,v
retrieving revision 1.11
diff -u -b -B -p -r1.11 dbus-timeout.c
--- dbus/dbus-timeout.c 30 Sep 2003 02:32:53 -0000 1.11
+++ dbus/dbus-timeout.c 26 Nov 2003 10:20:18 -0000
@@ -86,11 +86,14 @@ _dbus_timeout_new (int i
* Increments the reference count of a DBusTimeout object.
*
* @param timeout the timeout object.
+ * @returns the timeout object.
*/
-void
+DBusTimeout *
_dbus_timeout_ref (DBusTimeout *timeout)
{
timeout->refcount += 1;
+
+ return timeout;
}
/**
Index: dbus/dbus-timeout.h
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-timeout.h,v
retrieving revision 1.6
diff -u -b -B -p -r1.6 dbus-timeout.h
--- dbus/dbus-timeout.h 24 Apr 2003 21:26:25 -0000 1.6
+++ dbus/dbus-timeout.h 26 Nov 2003 10:20:18 -0000
@@ -38,7 +38,7 @@ DBusTimeout* _dbus_timeout_new
DBusTimeoutHandler handler,
void *data,
DBusFreeFunction free_data_function);
-void _dbus_timeout_ref (DBusTimeout *timeout);
+DBusTimeout* _dbus_timeout_ref (DBusTimeout *timeout);
void _dbus_timeout_unref (DBusTimeout *timeout);
void _dbus_timeout_set_interval (DBusTimeout *timeout,
int interval);
Index: dbus/dbus-transport.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-transport.c,v
retrieving revision 1.35
diff -u -b -B -p -r1.35 dbus-transport.c
--- dbus/dbus-transport.c 26 Oct 2003 15:36:15 -0000 1.35
+++ dbus/dbus-transport.c 26 Nov 2003 10:20:19 -0000
@@ -365,13 +365,16 @@ _dbus_transport_open (const char *ad
* Increments the reference count for the transport.
*
* @param transport the transport.
+ * @returns the transport.
*/
-void
+DBusTransport *
_dbus_transport_ref (DBusTransport *transport)
{
_dbus_assert (transport->refcount > 0);
transport->refcount += 1;
+
+ return transport;
}
/**
Index: dbus/dbus-transport.h
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-transport.h,v
retrieving revision 1.11
diff -u -b -B -p -r1.11 dbus-transport.h
--- dbus/dbus-transport.h 16 Apr 2003 23:01:33 -0000 1.11
+++ dbus/dbus-transport.h 26 Nov 2003 10:20:19 -0000
@@ -32,7 +32,7 @@ typedef struct DBusTransport DBusTranspo
DBusTransport* _dbus_transport_open (const char *address,
DBusError *error);
-void _dbus_transport_ref (DBusTransport *transport);
+DBusTransport* _dbus_transport_ref (DBusTransport *transport);
void _dbus_transport_unref (DBusTransport *transport);
void _dbus_transport_disconnect (DBusTransport *transport);
dbus_bool_t _dbus_transport_get_is_connected (DBusTransport *transport);
Index: dbus/dbus-userdb.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-userdb.c,v
retrieving revision 1.5
diff -u -b -B -p -r1.5 dbus-userdb.c
--- dbus/dbus-userdb.c 30 Sep 2003 02:32:53 -0000 1.5
+++ dbus/dbus-userdb.c 26 Nov 2003 10:20:19 -0000
@@ -635,13 +635,16 @@ _dbus_user_database_new (void)
/**
* Increments refcount of user database.
* @param db the database
+ * @returns the database
*/
-void
+DBusUserDatabase *
_dbus_user_database_ref (DBusUserDatabase *db)
{
_dbus_assert (db->refcount > 0);
db->refcount += 1;
+
+ return db;
}
/**
Index: dbus/dbus-userdb.h
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-userdb.h,v
retrieving revision 1.2
diff -u -b -B -p -r1.2 dbus-userdb.h
--- dbus/dbus-userdb.h 17 Apr 2003 23:17:04 -0000 1.2
+++ dbus/dbus-userdb.h 26 Nov 2003 10:20:19 -0000
@@ -31,7 +31,7 @@ DBUS_BEGIN_DECLS;
typedef struct DBusUserDatabase DBusUserDatabase;
DBusUserDatabase* _dbus_user_database_new (void);
-void _dbus_user_database_ref (DBusUserDatabase *db);
+DBusUserDatabase* _dbus_user_database_ref (DBusUserDatabase *db);
void _dbus_user_database_unref (DBusUserDatabase *db);
dbus_bool_t _dbus_user_database_get_groups (DBusUserDatabase *db,
dbus_uid_t uid,
Index: dbus/dbus-watch.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-watch.c,v
retrieving revision 1.14
diff -u -b -B -p -r1.14 dbus-watch.c
--- dbus/dbus-watch.c 30 Sep 2003 02:32:53 -0000 1.14
+++ dbus/dbus-watch.c 26 Nov 2003 10:20:19 -0000
@@ -97,11 +97,14 @@ _dbus_watch_new (int fd,
* Increments the reference count of a DBusWatch object.
*
* @param watch the watch object.
+ * @returns the watch object.
*/
-void
+DBusWatch *
_dbus_watch_ref (DBusWatch *watch)
{
watch->refcount += 1;
+
+ return watch;
}
/**
Index: dbus/dbus-watch.h
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-watch.h,v
retrieving revision 1.4
diff -u -b -B -p -r1.4 dbus-watch.h
--- dbus/dbus-watch.h 18 Apr 2003 04:18:57 -0000 1.4
+++ dbus/dbus-watch.h 26 Nov 2003 10:20:19 -0000
@@ -42,7 +42,7 @@ DBusWatch* _dbus_watch_new
DBusWatchHandler handler,
void *data,
DBusFreeFunction free_data_function);
-void _dbus_watch_ref (DBusWatch *watch);
+DBusWatch* _dbus_watch_ref (DBusWatch *watch);
void _dbus_watch_unref (DBusWatch *watch);
void _dbus_watch_invalidate (DBusWatch *watch);
void _dbus_watch_sanitize_condition (DBusWatch *watch,
Index: glib/dbus-gidl.c
===================================================================
RCS file: /cvs/dbus/dbus/glib/dbus-gidl.c,v
retrieving revision 1.2
diff -u -b -B -p -r1.2 dbus-gidl.c
--- glib/dbus-gidl.c 30 Sep 2003 02:32:57 -0000 1.2
+++ glib/dbus-gidl.c 26 Nov 2003 10:20:19 -0000
@@ -67,13 +67,15 @@ struct ArgInfo
ArgDirection direction;
};
-void
+BaseInfo *
base_info_ref (BaseInfo *info)
{
g_return_if_fail (info != NULL);
g_return_if_fail (info->refcount > 0);
info->refcount += 1;
+
+ return info;
}
static void
@@ -222,10 +224,12 @@ node_info_new (const char *name)
return info;
}
-void
+NodeInfo *
node_info_ref (NodeInfo *info)
{
info->base.refcount += 1;
+
+ return info;
}
void
@@ -287,10 +291,12 @@ interface_info_new (const char *name)
return info;
}
-void
+InterfaceInfo *
interface_info_ref (InterfaceInfo *info)
{
info->base.refcount += 1;
+
+ return info;
}
void
@@ -366,10 +372,12 @@ method_info_new (const char *name)
return info;
}
-void
+MethodInfo *
method_info_ref (MethodInfo *info)
{
info->base.refcount += 1;
+
+ return info;
}
void
@@ -416,10 +425,12 @@ signal_info_new (const char *name)
return info;
}
-void
+SignalInfo *
signal_info_ref (SignalInfo *info)
{
info->base.refcount += 1;
+
+ return info;
}
void
@@ -472,10 +483,12 @@ arg_info_new (const char *name,
return info;
}
-void
+ArgInfo *
arg_info_ref (ArgInfo *info)
{
info->base.refcount += 1;
+
+ return info;
}
void
Index: glib/dbus-gidl.h
===================================================================
RCS file: /cvs/dbus/dbus/glib/dbus-gidl.h,v
retrieving revision 1.2
diff -u -b -B -p -r1.2 dbus-gidl.h
--- glib/dbus-gidl.h 30 Sep 2003 02:32:57 -0000 1.2
+++ glib/dbus-gidl.h 26 Nov 2003 10:20:19 -0000
@@ -54,7 +54,7 @@ typedef enum
} InfoType;
-void base_info_ref (BaseInfo *info);
+BaseInfo* base_info_ref (BaseInfo *info);
void base_info_unref (BaseInfo *info);
InfoType base_info_get_type (BaseInfo *info);
const char* base_info_get_name (BaseInfo *info);
@@ -65,7 +65,7 @@ GType base_info_get_gtype
NodeInfo* node_info_new (const char *name);
-void node_info_ref (NodeInfo *info);
+NodeInfo* node_info_ref (NodeInfo *info);
void node_info_unref (NodeInfo *info);
const char* node_info_get_name (NodeInfo *info);
GSList* node_info_get_interfaces (NodeInfo *info);
@@ -76,7 +76,7 @@ void node_info_add_node
NodeInfo *child);
InterfaceInfo* interface_info_new (const char *name);
-void interface_info_ref (InterfaceInfo *info);
+InterfaceInfo* interface_info_ref (InterfaceInfo *info);
void interface_info_unref (InterfaceInfo *info);
const char* interface_info_get_name (InterfaceInfo *info);
GSList* interface_info_get_methods (InterfaceInfo *info);
@@ -87,7 +87,7 @@ void interface_info_add_signal
SignalInfo *signal);
MethodInfo* method_info_new (const char *name);
-void method_info_ref (MethodInfo *info);
+MethodInfo* method_info_ref (MethodInfo *info);
void method_info_unref (MethodInfo *info);
const char* method_info_get_name (MethodInfo *info);
@@ -96,7 +96,7 @@ void method_info_add_arg
ArgInfo *arg);
SignalInfo* signal_info_new (const char *name);
-void signal_info_ref (SignalInfo *info);
+SignalInfo* signal_info_ref (SignalInfo *info);
void signal_info_unref (SignalInfo *info);
const char* signal_info_get_name (SignalInfo *info);
@@ -107,7 +107,7 @@ void signal_info_add_arg
ArgInfo* arg_info_new (const char *name,
ArgDirection direction,
int type);
-void arg_info_ref (ArgInfo *info);
+ArgInfo* arg_info_ref (ArgInfo *info);
void arg_info_unref (ArgInfo *info);
const char* arg_info_get_name (ArgInfo *info);
int arg_info_get_type (ArgInfo *info);
Index: glib/dbus-gmain.c
===================================================================
RCS file: /cvs/dbus/dbus/glib/dbus-gmain.c,v
retrieving revision 1.25
diff -u -b -B -p -r1.25 dbus-gmain.c
--- glib/dbus-gmain.c 12 Oct 2003 05:59:39 -0000 1.25
+++ glib/dbus-gmain.c 26 Nov 2003 10:20:19 -0000
@@ -88,10 +88,12 @@ watch_fd_new (void)
return watch_fd;
}
-static void
+static WatchFD *
watch_fd_ref (WatchFD *watch_fd)
{
watch_fd->refcount += 1;
+
+ return watch_fd;
}
static void
Index: glib/dbus-gparser.c
===================================================================
RCS file: /cvs/dbus/dbus/glib/dbus-gparser.c,v
retrieving revision 1.2
diff -u -b -B -p -r1.2 dbus-gparser.c
--- glib/dbus-gparser.c 30 Sep 2003 02:32:57 -0000 1.2
+++ glib/dbus-gparser.c 26 Nov 2003 10:20:19 -0000
@@ -184,10 +184,12 @@ parser_new (void)
return parser;
}
-void
+Parser *
parser_ref (Parser *parser)
{
parser->refcount += 1;
+
+ return parser;
}
void
Index: glib/dbus-gparser.h
===================================================================
RCS file: /cvs/dbus/dbus/glib/dbus-gparser.h,v
retrieving revision 1.2
diff -u -b -B -p -r1.2 dbus-gparser.h
--- glib/dbus-gparser.h 30 Sep 2003 02:32:57 -0000 1.2
+++ glib/dbus-gparser.h 26 Nov 2003 10:20:19 -0000
@@ -32,7 +32,7 @@ G_BEGIN_DECLS
typedef struct Parser Parser;
Parser* parser_new (void);
-void parser_ref (Parser *parser);
+Parser* parser_ref (Parser *parser);
void parser_unref (Parser *parser);
gboolean parser_check_doctype (Parser *parser,
const char *doctype,
Index: glib/dbus-gproxy.c
===================================================================
RCS file: /cvs/dbus/dbus/glib/dbus-gproxy.c,v
retrieving revision 1.6
diff -u -b -B -p -r1.6 dbus-gproxy.c
--- glib/dbus-gproxy.c 21 Oct 2003 05:46:52 -0000 1.6
+++ glib/dbus-gproxy.c 26 Nov 2003 10:20:19 -0000
@@ -93,7 +93,7 @@ struct DBusGProxyManager
};
-static void dbus_gproxy_manager_ref (DBusGProxyManager *manager);
+static DBusGProxyManager *dbus_gproxy_manager_ref (DBusGProxyManager *manager);
static DBusHandlerResult dbus_gproxy_manager_filter (DBusConnection *connection,
DBusMessage *message,
void *user_data);
@@ -152,7 +152,7 @@ dbus_gproxy_manager_get (DBusConnection
return manager;
}
-static void
+static DBusGProxyManager *
dbus_gproxy_manager_ref (DBusGProxyManager *manager)
{
g_assert (manager != NULL);
@@ -163,6 +163,8 @@ dbus_gproxy_manager_ref (DBusGProxyManag
manager->refcount += 1;
UNLOCK_MANAGER (manager);
+
+ return manager;
}
static void
--=-WnuRFg0Sci+c8D6sLmHI--