]> granicus.if.org Git - graphviz/commitdiff
GVC: export 'gvToolTred'
authorSaleem Abdulrasool <compnerd+gitlab@compnerd.org>
Sun, 2 May 2021 16:04:57 +0000 (16:04 +0000)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 2 May 2021 16:04:57 +0000 (16:04 +0000)
CHANGELOG.md
lib/gvc.vcxproj
lib/gvc.vcxproj.filters
lib/gvc/gvc.def
rtest/2057.c [new file with mode: 0644]
rtest/test_regression.py

index 5da55bbc666c0248a116bcec3d4d69085420f7f0..4511ddb09b5a5668608b4757e1ad17225a77166e 100644 (file)
@@ -21,6 +21,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
 - Uninitialized variable read in delaunay_tri
 - potentially mismatched format string in tclpkg
+- `gvToolTred` is now exported from gvc.dll on Windows mirroring the behavior on
+  Unix platforms.
 
 ## [2.47.1] - 2021-04-17
 
index 32ebc71d2e1aaa2edced92c644e6fb2340fdc905..708d8b4b0043de4acd2a2d84956cc9d26ad809cd 100644 (file)
@@ -190,6 +190,7 @@ awk -f $(SolutionDir)awk\colortbl.awk color_lib &gt; common\colortbl.h</Command>
     <ClCompile Include="gvc\gvplugin.c" />
     <ClCompile Include="gvc\gvrender.c" />
     <ClCompile Include="gvc\gvtextlayout.c" />
+    <ClCompile Include="gvc\gvtool_tred.c" />
     <ClCompile Include="gvc\gvusershape.c" />
     <ClCompile Include="label\index.c" />
     <ClCompile Include="label\node.c" />
index 85cb0334af26b0d1ad625a5f4386cc2c30d35da2..36bfe21a4e9736fdd01c2e93ea925ce37bbb1287 100644 (file)
     <ClCompile Include="gvc\gvtextlayout.c">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="gvc\gvtool_tred.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
     <ClCompile Include="gvc\gvusershape.c">
       <Filter>Source Files</Filter>
     </ClCompile>
index 8aafb6828e0971b7b3cba418587262f92eb78574..53dfaf835e67e22ed39d2bd90b31df5f6bff549c 100644 (file)
@@ -157,6 +157,7 @@ gvFreeRenderData
 gvRenderFilename    
 gvRenderJobs    
 gvToggle    
+gvToolTred
 gvusershape_file_access    
 gvusershape_file_release    
 gvwrite    
diff --git a/rtest/2057.c b/rtest/2057.c
new file mode 100644 (file)
index 0000000..dea7c09
--- /dev/null
@@ -0,0 +1,9 @@
+// see test_regression.py:test_2057
+
+#include <stdio.h>
+#include <graphviz/gvc.h>
+
+int main(void) {
+  printf("%p\n", gvToolTred);
+  return 0;
+}
index 2f2fc87c371f38a0ba216e8865cc81500d2d3083..84d5b295a63b21d761549b25cd420c9dd53ff6dd 100644 (file)
@@ -769,6 +769,25 @@ def test_1931():
   assert "line 3\nline 4" in xdot
   assert "line 5\nline 6" in xdot
 
+def test_2057():
+  """
+  gvToolTred should be usable by user code
+  https://gitlab.com/graphviz/graphviz/-/issues/2057
+  """
+
+  # FIXME: Remove skip when
+  # https://gitlab.com/graphviz/graphviz/-/issues/1777 is fixed
+  if os.getenv("build_system") == "msbuild":
+    pytest.skip("Windows MSBuild release does not contain any header files (#1777)")
+
+  # find co-located test source
+  c_src = (Path(__file__).parent / "2057.c").resolve()
+  assert c_src.exists(), "missing test case"
+
+  # run the test
+  ret, _, _ = run_c(c_src, link=["gvc"])
+  assert ret == 0
+
 def test_package_version():
   """
   The graphviz_version.h header should define a non-empty PACKAGE_VERSION