From: Magnus Jacobsson Date: Wed, 11 Aug 2021 13:41:26 +0000 (+0200) Subject: pathplan: add storage-class attribute declarations in tri.h X-Git-Tag: 3.0.0~121^2~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b28c43ffe14ebff82dadac8f6e75793700ec21f5;p=graphviz pathplan: add storage-class attribute declarations in tri.h This will allow removing the tri.h symbols from the pathplan.def file in an upcoming commit. Towards https://gitlab.com/graphviz/graphviz/-/issues/2058. --- diff --git a/lib/pathplan/tri.h b/lib/pathplan/tri.h index b69e7a27c..274723724 100644 --- a/lib/pathplan/tri.h +++ b/lib/pathplan/tri.h @@ -15,11 +15,25 @@ extern "C" { #include +#ifdef GVDLL +#ifdef PATHPLAN_EXPORTS +#define TRI_API __declspec(dllexport) +#else +#define TRI_API __declspec(dllimport) +#endif +#endif + +#ifndef TRI_API +#define TRI_API /* nothing */ +#endif + /* Points in polygon must be in CCW order */ - int Ptriangulate(Ppoly_t * polygon, + TRI_API int Ptriangulate(Ppoly_t * polygon, void (*fn) (void *closure, Ppoint_t tri[]), void *vc); +#undef TRI_API + #ifdef __cplusplus } #endif