]> gitweb.factorcode.org Git - factor.git/commitdiff
graphviz: fix test errors on the mac.
authorJohn Benediktsson <mrjbq7@gmail.com>
Tue, 14 Aug 2012 00:59:09 +0000 (17:59 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 14 Aug 2012 00:59:09 +0000 (17:59 -0700)
extra/graphviz/ffi/ffi.factor
extra/graphviz/render/render.factor

index 23865e2eacb554e67afc6166e5f4a55ce35e59ad..690eab415ab5bf36eb664bd808ff5892369721ce 100644 (file)
@@ -104,8 +104,11 @@ M: ffi-errors error.
     " error(s) occurred while rendering." print
     "(The messages were probably printed to STDERR.)" print ;
 
+: ?ffi-errors ( n -- )
+    [ ffi-errors ] unless-zero ; inline
+
 : gvFreeContext ( gvc -- )
-    int-gvFreeContext [ ffi-errors ] unless-zero ;
+    int-gvFreeContext ?ffi-errors ;
 
 DESTRUCTOR: gvFreeContext
 
@@ -162,7 +165,7 @@ FUNCTION: c-string
         gvContext &gvFreeContext _ "" gvplugin_list
         " " split harvest
     ] with-destructors ;
-    
+
 PRIVATE>
 
 MEMO: supported-engines ( -- seq ) API_layout plugin-list ;
index 794e42350974d69f1edf718fb2ba375eb7b43df0..4a683a0aacd73135b2b3fd96cfff7e5a4bc185e8 100644 (file)
@@ -83,9 +83,8 @@ M: unsupported-engine summary
         graph id>> graph kind agopen &agclose :> g
         g graph build-alien
         g -K compute-engine :> engine
-        gvc g engine gvLayout drop
-        [ gvc g -T -o gvRenderFilename drop -o ]
-        [ gvc g gvFreeLayout drop ] [ ] cleanup
+        gvc g engine gvLayout ?ffi-errors
+        gvc g -T -o gvRenderFilename ?ffi-errors -o
     ] with-destructors ;
 
 : (preview) ( graph -- -o )