[evolution-patches] evolution-data-server, libedataserver/e-component-listener.c build failed



Hi, Harish 

        When I was trying to build the newest code of evolution data
server
(Head), the process failed with e-component-listener.c, because
G_DEFINE_TYPE is now used to implement EComponentListener without
removing the original declarations of e_component_listener_class_init,
e_component_listener_init and e_component_listener_finalize. 

        Second, in the definition of e_component_listener_init, only 
the first
parameter should be used instead of two. 

        Third, e_component_listener_finalized should be moved before
e_component_listener_class_init because it is invoked in that function. 

        I created a patch for your kind review. 

        Thanks 

--Irene 
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/ChangeLog,v
retrieving revision 1.320
diff -u -r1.320 ChangeLog
--- ChangeLog	17 Nov 2005 11:41:53 -0000	1.320
+++ ChangeLog	18 Nov 2005 10:05:51 -0000
@@ -1,3 +1,12 @@
+2005-11-18  Irene Huang <Irene Huang sun com>
+
+	* libedataserver/e-component-listener.c:
+	(e_component_listener_finalize), (e_component_listener_init): 
+	remove declarations of e_component_listener_finalize,
+	e_component_listener_init and e_component_listener_class_init.
+	Move e_component_listener_finalize before e_component_listener_class_init.
+	Remove the second parameter of e_component_listener_init.
+
 2005-11-17  Ross Burton  <ross burtonini com>
 
 	* md5-utils.c:
Index: libedataserver/e-component-listener.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/libedataserver/e-component-listener.c,v
retrieving revision 1.3
diff -u -r1.3 e-component-listener.c
--- libedataserver/e-component-listener.c	17 Nov 2005 11:38:47 -0000	1.3
+++ libedataserver/e-component-listener.c	18 Nov 2005 10:05:51 -0000
@@ -21,10 +21,6 @@
 	Bonobo_Unknown component;
 };
 
-static void e_component_listener_class_init (EComponentListenerClass *klass);
-static void e_component_listener_init       (EComponentListener *cl, EComponentListenerClass *klass);
-static void e_component_listener_finalize   (GObject *object);
-
 static GList *watched_connections = NULL;
 
 enum {
@@ -62,6 +58,26 @@
 G_DEFINE_TYPE (EComponentListener, e_component_listener, G_TYPE_OBJECT);
 
 static void
+e_component_listener_finalize (GObject *object)
+{
+	EComponentListener *cl = (EComponentListener *) object;
+
+	g_return_if_fail (E_IS_COMPONENT_LISTENER (cl));
+
+	watched_connections = g_list_remove (watched_connections, cl);
+
+	if (cl->priv->component != CORBA_OBJECT_NIL)
+		cl->priv->component = CORBA_OBJECT_NIL;
+
+	/* free memory */
+	g_free (cl->priv);
+	cl->priv = NULL;
+
+	if (G_OBJECT_CLASS (e_component_listener_parent_class)->finalize)
+		(* G_OBJECT_CLASS (e_component_listener_parent_class)->finalize) (object);
+}
+
+static void
 e_component_listener_class_init (EComponentListenerClass *klass)
 {
 	GObjectClass *object_class = G_OBJECT_CLASS (klass);
@@ -80,31 +96,11 @@
 }
 
 static void
-e_component_listener_init (EComponentListener *cl, EComponentListenerClass *klass)
+e_component_listener_init (EComponentListener *cl)
 {
 	/* allocate internal structure */
 	cl->priv = g_new (EComponentListenerPrivate, 1);
 	cl->priv->component = CORBA_OBJECT_NIL;
-}
-
-static void
-e_component_listener_finalize (GObject *object)
-{
-	EComponentListener *cl = (EComponentListener *) object;
-
-	g_return_if_fail (E_IS_COMPONENT_LISTENER (cl));
-
-	watched_connections = g_list_remove (watched_connections, cl);
-
-	if (cl->priv->component != CORBA_OBJECT_NIL)
-		cl->priv->component = CORBA_OBJECT_NIL;
-
-	/* free memory */
-	g_free (cl->priv);
-	cl->priv = NULL;
-
-	if (G_OBJECT_CLASS (e_component_listener_parent_class)->finalize)
-		(* G_OBJECT_CLASS (e_component_listener_parent_class)->finalize) (object);
 }
 
 /**


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]