dbus/glib dbus-gidl.c,1.2,1.3 dbus-gidl.h,1.2,1.3 dbus-gmain.c,1.25,1.26 dbus-gparser.c,1.2,1.3 dbus-gparser.h,1.2,1.3 dbus-gproxy.c,1.6,1.7

Mikael Hallendal micke@pdx.freedesktop.org
Wed, 26 Nov 2003 17:25:52 -0800


Update of /cvs/dbus/dbus/glib
In directory pdx:/tmp/cvs-serv6358/glib

Modified Files:
	dbus-gidl.c dbus-gidl.h dbus-gmain.c dbus-gparser.c 
	dbus-gparser.h dbus-gproxy.c 
Log Message:
2003-11-26  Mikael Hallendal  <micke@imendio.com>

	* bus/*.[ch]:
	* dbus/*.[ch]:
	* glib/*.[ch]: Made ref functions return the pointer



Index: dbus-gidl.c
===================================================================
RCS file: /cvs/dbus/dbus/glib/dbus-gidl.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- dbus-gidl.c	30 Sep 2003 02:32:57 -0000	1.2
+++ dbus-gidl.c	27 Nov 2003 01:25:50 -0000	1.3
@@ -67,13 +67,15 @@
   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 @@
   return info;
 }
 
-void
+NodeInfo *
 node_info_ref (NodeInfo *info)
 {
   info->base.refcount += 1;
+
+  return info;
 }
 
 void
@@ -287,10 +291,12 @@
   return info;
 }
 
-void
+InterfaceInfo *
 interface_info_ref (InterfaceInfo *info)
 {
   info->base.refcount += 1;
+
+  return info;
 }
 
 void
@@ -366,10 +372,12 @@
   return info;
 }
 
-void
+MethodInfo *
 method_info_ref (MethodInfo *info)
 {
   info->base.refcount += 1;
+
+  return info;
 }
 
 void
@@ -416,10 +424,12 @@
   return info;
 }
 
-void
+SignalInfo *
 signal_info_ref (SignalInfo *info)
 {
   info->base.refcount += 1;
+
+  return info;
 }
 
 void
@@ -472,10 +482,12 @@
   return info;
 }
 
-void
+ArgInfo *
 arg_info_ref (ArgInfo *info)
 {
   info->base.refcount += 1;
+
+  return info;
 }
 
 void

Index: dbus-gidl.h
===================================================================
RCS file: /cvs/dbus/dbus/glib/dbus-gidl.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- dbus-gidl.h	30 Sep 2003 02:32:57 -0000	1.2
+++ dbus-gidl.h	27 Nov 2003 01:25:50 -0000	1.3
@@ -54,7 +54,7 @@
 
 } 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 @@
 
 
 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 @@
                                            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 @@
                                            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 @@
                                            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 @@
 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: dbus-gmain.c
===================================================================
RCS file: /cvs/dbus/dbus/glib/dbus-gmain.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- dbus-gmain.c	12 Oct 2003 05:59:39 -0000	1.25
+++ dbus-gmain.c	27 Nov 2003 01:25:50 -0000	1.26
@@ -88,10 +88,12 @@
   return watch_fd;
 }
 
-static void
+static WatchFD * 
 watch_fd_ref (WatchFD *watch_fd)
 {
   watch_fd->refcount += 1;
+
+  return watch_fd;
 }
 
 static void

Index: dbus-gparser.c
===================================================================
RCS file: /cvs/dbus/dbus/glib/dbus-gparser.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- dbus-gparser.c	30 Sep 2003 02:32:57 -0000	1.2
+++ dbus-gparser.c	27 Nov 2003 01:25:50 -0000	1.3
@@ -184,10 +184,12 @@
   return parser;
 }
 
-void
+Parser *
 parser_ref (Parser *parser)
 {
   parser->refcount += 1;
+
+  return parser;
 }
 
 void

Index: dbus-gparser.h
===================================================================
RCS file: /cvs/dbus/dbus/glib/dbus-gparser.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- dbus-gparser.h	30 Sep 2003 02:32:57 -0000	1.2
+++ dbus-gparser.h	27 Nov 2003 01:25:50 -0000	1.3
@@ -32,7 +32,7 @@
 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: dbus-gproxy.c
===================================================================
RCS file: /cvs/dbus/dbus/glib/dbus-gproxy.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- dbus-gproxy.c	21 Oct 2003 05:46:52 -0000	1.6
+++ dbus-gproxy.c	27 Nov 2003 01:25:50 -0000	1.7
@@ -93,7 +93,7 @@
 
 };
 
-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 @@
   return manager;
 }
 
-static void
+static DBusGProxyManager * 
 dbus_gproxy_manager_ref (DBusGProxyManager *manager)
 {
   g_assert (manager != NULL);
@@ -163,6 +163,8 @@
   manager->refcount += 1;
 
   UNLOCK_MANAGER (manager);
+
+  return manager;
 }
 
 static void