gegl r1869 - in trunk: . gegl/operation



Author: neo
Date: Fri Jan 18 23:23:02 2008
New Revision: 1869
URL: http://svn.gnome.org/viewvc/gegl?rev=1869&view=rev

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

	* gegl/operation/gegl-operation-meta.c: use GSlice for the
	Redirect struct.



Modified:
   trunk/ChangeLog
   trunk/gegl/operation/gegl-operation-meta.c

Modified: trunk/gegl/operation/gegl-operation-meta.c
==============================================================================
--- trunk/gegl/operation/gegl-operation-meta.c	(original)
+++ trunk/gegl/operation/gegl-operation-meta.c	Fri Jan 18 23:23:02 2008
@@ -94,7 +94,7 @@
                                GeglNode    *internal,
                                const gchar *internal_name)
 {
-  Redirect *self = g_malloc0 (sizeof (Redirect));
+  Redirect *self = g_slice_new (Redirect);
 
   self->name          = g_strdup (name);
   self->internal      = internal;
@@ -110,7 +110,7 @@
     g_free (self->name);
   if (self->internal_name)
     g_free (self->internal_name);
-  g_free (self);
+  g_slice_free (Redirect, self);
 }
 
 /* FIXME: take GeglNode's as parameters, since we need
@@ -174,14 +174,12 @@
 finalize (GObject *gobject)
 {
   GeglOperationMeta *self = GEGL_OPERATION_META (gobject);
-  GSList            *iter = self->redirects;
+  GSList            *iter;
 
-  while (iter)
-    {
-      Redirect *redirect = iter->data;
-      iter = g_slist_remove (iter, redirect);
-      redirect_destroy (redirect);
-    }
+  for (iter = self->redirects; iter; iter = iter->next)
+    redirect_destroy (iter->data);
+
+  g_slist_free (self->redirects);
 
   G_OBJECT_CLASS (gegl_operation_meta_parent_class)->finalize (gobject);
 }



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