From: Magnus Jacobsson Date: Thu, 22 Jul 2021 19:40:24 +0000 (+0200) Subject: pathplan: add storage-class attribute declarations in pathgeom.h X-Git-Tag: 3.0.0~121^2~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bca8f6b65a999e5146b06ea9e7e810c16ae42c7c;p=graphviz pathplan: add storage-class attribute declarations in pathgeom.h 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. --- diff --git a/lib/pathplan/pathgeom.h b/lib/pathplan/pathgeom.h index 24a0d415d..437d987d2 100644 --- a/lib/pathplan/pathgeom.h +++ b/lib/pathplan/pathgeom.h @@ -14,6 +14,18 @@ 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