]> granicus.if.org Git - graphviz/commitdiff
pathplan: add storage-class attribute declarations in pathgeom.h
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Thu, 22 Jul 2021 19:40:24 +0000 (21:40 +0200)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Sun, 19 Dec 2021 20:21:55 +0000 (21:21 +0100)
This will allow removing the pathgeom.h symbols from the pathplan.def
file in an upcoming commit.

Towards https://gitlab.com/graphviz/graphviz/-/issues/2058.

lib/pathplan/pathgeom.h

index 24a0d415d205b7d69432b1c930798f808c7b074b..437d987d214705ce51f21b72d0eb700bc197f883 100644 (file)
 extern "C" {
 #endif
 
+#ifdef GVDLL
+#ifdef PATHPLAN_EXPORTS
+#define PATHGEOM_API __declspec(dllexport)
+#else
+#define PATHGEOM_API __declspec(dllimport)
+#endif
+#endif
+
+#ifndef PATHGEOM_API
+#define PATHGEOM_API /* nothing */
+#endif
+
 #ifdef HAVE_POINTF_S
     typedef struct pointf_s Ppoint_t;
     typedef struct pointf_s Pvector_t;
@@ -40,7 +52,10 @@ extern "C" {
 /* opaque state handle for visibility graph operations */
     typedef struct vconfig_s vconfig_t;
 
-    void freePath(Ppolyline_t* p);
+    PATHGEOM_API void freePath(Ppolyline_t* p);
+
+#undef PATHGEOM_API
+
 #ifdef __cplusplus
 }
 #endif