gegl r1923 - in trunk: . gegl/graph



Author: neo
Date: Mon Jan 28 11:56:56 2008
New Revision: 1923
URL: http://svn.gnome.org/viewvc/gegl?rev=1923&view=rev

Log:
2008-01-28  Sven Neumann  <sven gimp org>

	* gegl/graph/gegl-connection.[ch]: added gegl_connection_destroy()
	and GSlice-allocate the GeglConnection structs.

	* gegl/graph/gegl-node.c: changed accordingly.


Modified:
   trunk/ChangeLog
   trunk/gegl/graph/gegl-connection.c
   trunk/gegl/graph/gegl-connection.h
   trunk/gegl/graph/gegl-node.c

Modified: trunk/gegl/graph/gegl-connection.c
==============================================================================
--- trunk/gegl/graph/gegl-connection.c	(original)
+++ trunk/gegl/graph/gegl-connection.c	Mon Jan 28 11:56:56 2008
@@ -39,7 +39,7 @@
                      GeglNode *source,
                      GeglPad  *source_pad)
 {
-  GeglConnection *self = g_new0 (GeglConnection, 1);
+  GeglConnection *self = g_slice_new0 (GeglConnection);
 
   self->sink       = sink;
   self->sink_pad   = sink_pad;
@@ -49,6 +49,12 @@
   return self;
 }
 
+void
+gegl_connection_destroy (GeglConnection *self)
+{
+  g_slice_free (GeglConnection, self);
+}
+
 GeglNode *
 gegl_connection_get_source_node (GeglConnection *self)
 {

Modified: trunk/gegl/graph/gegl-connection.h
==============================================================================
--- trunk/gegl/graph/gegl-connection.h	(original)
+++ trunk/gegl/graph/gegl-connection.h	Mon Jan 28 11:56:56 2008
@@ -26,6 +26,7 @@
                                                   GeglPad        *sink_pad,
                                                   GeglNode       *source,
                                                   GeglPad        *source_pad);
+void             gegl_connection_destroy         (GeglConnection *self);
 GeglNode       * gegl_connection_get_source_node (GeglConnection *self);
 GeglNode       * gegl_connection_get_sink_node   (GeglConnection *self);
 GeglPad        * gegl_connection_get_source_pad  (GeglConnection *self);

Modified: trunk/gegl/graph/gegl-node.c
==============================================================================
--- trunk/gegl/graph/gegl-node.c	(original)
+++ trunk/gegl/graph/gegl-node.c	Mon Jan 28 11:56:56 2008
@@ -633,7 +633,7 @@
       sink->sources = g_slist_remove (sink->sources, connection);
       source->sinks = g_slist_remove (source->sinks, connection);
 
-      g_free (connection);
+      gegl_connection_destroy (connection);
 
       return TRUE;
     }



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