[gegl/soc-2011-warp] GeglPath: a bit more of organisation



commit 3a02124c2b08bcf37c5086e58a4bdebd02782973
Author: Michael Murà <batolettre gmail com>
Date:   Tue Jun 28 19:32:45 2011 +0200

    GeglPath: a bit more of organisation

 gegl/property-types/gegl-path.c |   70 +++++++++++++++++++-------------------
 1 files changed, 35 insertions(+), 35 deletions(-)
---
diff --git a/gegl/property-types/gegl-path.c b/gegl/property-types/gegl-path.c
index 719eedc..d38cb17 100644
--- a/gegl/property-types/gegl-path.c
+++ b/gegl/property-types/gegl-path.c
@@ -1302,41 +1302,6 @@ gegl_path_item_free (GeglPathList *p)
 }
 
 /***** GeglPathList *****/
-static GeglPathList *
-gegl_path_list_append_item  (GeglPathList  *head,
-                             gchar          type,
-                             GeglPathList **res,
-                             GeglPathList  *tail)
-{
-  GeglPathList *iter = tail?tail:head;
-  InstructionInfo *info = lookup_instruction_info (type);
-  g_assert (info);
-
-  while (iter && iter->next)
-    iter=iter->next;
-
-  if (iter)
-    {
-      /* the +3 is padding, +1 was excpected to be sufficient */
-      iter->next =
-        g_slice_alloc0 (sizeof (gpointer) + sizeof (gchar) + sizeof (gfloat)*2 *(info->n_items+3)/2);
-      iter->next->d.type = type;
-      iter = iter->next;
-    }
-  else /* creating new path */
-    {
-      /* the +3 is padding, +1 was excpected to be sufficient */
-      head =
-        g_slice_alloc0 (sizeof (gpointer) + sizeof (gchar) + sizeof (gfloat)*2 *(info->n_items+3)/2);
-      head->d.type = type;
-      iter=head;
-    }
-  g_assert (res);
-  *res = iter;
-
-  return head;
-}
-
 GeglPathList *
 gegl_path_list_destroy (GeglPathList *path)
 {
@@ -1380,6 +1345,41 @@ gegl_path_list_append (GeglPathList *head,
 }
 
 static GeglPathList *
+gegl_path_list_append_item  (GeglPathList  *head,
+                             gchar          type,
+                             GeglPathList **res,
+                             GeglPathList  *tail)
+{
+  GeglPathList *iter = tail?tail:head;
+  InstructionInfo *info = lookup_instruction_info (type);
+  g_assert (info);
+
+  while (iter && iter->next)
+    iter=iter->next;
+
+  if (iter)
+    {
+      /* the +3 is padding, +1 was excpected to be sufficient */
+      iter->next =
+        g_slice_alloc0 (sizeof (gpointer) + sizeof (gchar) + sizeof (gfloat)*2 *(info->n_items+3)/2);
+      iter->next->d.type = type;
+      iter = iter->next;
+    }
+  else /* creating new path */
+    {
+      /* the +3 is padding, +1 was excpected to be sufficient */
+      head =
+        g_slice_alloc0 (sizeof (gpointer) + sizeof (gchar) + sizeof (gfloat)*2 *(info->n_items+3)/2);
+      head->d.type = type;
+      iter=head;
+    }
+  g_assert (res);
+  *res = iter;
+
+  return head;
+}
+
+static GeglPathList *
 gegl_path_list_flatten (GeglMatrix3  *matrix,
                         GeglPathList *original)
 {



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