[gegl] serialize: add conditional re#define for win32



commit d3bab249a97ff8c797e85eb12b289e170dcabfd6
Author: Øyvind Kolås <pippin gimp org>
Date:   Fri May 5 14:24:05 2017 +0200

    serialize: add conditional re#define for win32
    
    As observed by houz and reported through IRC

 gegl/gegl-serialize.c               |    8 +++++++-
 gegl/process/gegl-graph-traversal.c |   16 ++++++++++------
 2 files changed, 17 insertions(+), 7 deletions(-)
---
diff --git a/gegl/gegl-serialize.c b/gegl/gegl-serialize.c
index e63a888..283951c 100644
--- a/gegl/gegl-serialize.c
+++ b/gegl/gegl-serialize.c
@@ -13,9 +13,10 @@
  * You should have received a copy of the GNU Lesser General Public
  * License along with GEGL; if not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright 2016 Øyvind Kolås
+ * Copyright 2016, 2017 Øyvind Kolås
  */
 
+#include "config.h"
 #include "gegl.h"
 #include <string.h>
 #include <limits.h>
@@ -23,6 +24,11 @@
 #include <stdio.h>
 #include "property-types/gegl-paramspecs.h"
 
+#ifdef G_OS_WIN32
+#include <direct.h>
+#define realpath(a,b) _fullpath(b,a,_MAX_PATH)
+#endif
+
 //#define make_rel(strv) (g_strtod (strv, NULL) * gegl_node_get_bounding_box
 // (iter[0]).height)
 #define make_rel(strv) (g_strtod (strv, NULL) * rel_dim)
diff --git a/gegl/process/gegl-graph-traversal.c b/gegl/process/gegl-graph-traversal.c
index c2188e5..2114434 100644
--- a/gegl/process/gegl-graph-traversal.c
+++ b/gegl/process/gegl-graph-traversal.c
@@ -376,7 +376,7 @@ gegl_graph_get_shared_empty (GeglGraphTraversal *path)
 /**
  * gegl_graph_process:
  * @path: The traversal path
- * 
+ *
  * Process the prepared request. This will return the
  * resulting buffer from the final node, or NULL if
  * that node is a sink.
@@ -430,7 +430,10 @@ gegl_graph_process (GeglGraphTraversal *path,
             }
           else
             {
-              /* Guarantee input pad */
+              /* provide something on input pad, always - this makes having
+                 behavior depending on it not being set.. not work, is
+                 sacrifising that worth it?
+               */
               if (gegl_node_has_pad (node, "input") &&
                   !gegl_operation_context_get_object (context, "input"))
                 {
@@ -438,6 +441,10 @@ gegl_graph_process (GeglGraphTraversal *path,
                 }
 
               context->level = level;
+
+              /* note: this hard-coding of "output" makes some more custom
+               * graph topologies harder than neccesary.
+               */
               gegl_operation_process (operation, context, "output", &context->need_rect, context->level);
               operation_result = GEGL_BUFFER (gegl_operation_context_get_object (context, "output"));
 
@@ -461,7 +468,7 @@ gegl_graph_process (GeglGraphTraversal *path,
                      gegl_node_get_debug_name (node),
                      "output",
                      g_list_length (targets));
-          
+
           if (g_list_length (targets) > 1)
             gegl_object_set_has_forked (G_OBJECT (operation_result));
 
@@ -470,15 +477,12 @@ gegl_graph_process (GeglGraphTraversal *path,
               ContextConnection *target_con = targets_iter->data;
               gegl_operation_context_set_object (target_con->context, target_con->name, G_OBJECT 
(operation_result));
             }
-          
           g_list_free_full (targets, free_context_connection);
         }
-      
       last_context = context;
 
       GEGL_INSTRUMENT_END ("process", gegl_node_get_operation (node));
     }
-  
   if (last_context)
     {
       if (operation_result)


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