diff options
author | David Robillard <d@drobilla.net> | 2015-01-18 12:35:58 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2015-01-18 12:35:58 -0500 |
commit | 61ee1b13fdc6e29d9f9cf33e4ea133e2cd5e4368 (patch) | |
tree | f47a84917b9f5f17ebfc602bd0dd2724364e3710 /lv2 | |
parent | 997562c5566423918e1638d657d1b912c040c6b6 (diff) | |
download | lv2-61ee1b13fdc6e29d9f9cf33e4ea133e2cd5e4368.tar.xz |
Add extern/visibility to LV2_SYMBOL_EXPORT.
Diffstat (limited to 'lv2')
-rw-r--r-- | lv2/lv2plug.in/ns/lv2core/lv2.h | 13 | ||||
-rw-r--r-- | lv2/lv2plug.in/ns/lv2core/lv2core.doap.ttl | 2 |
2 files changed, 13 insertions, 2 deletions
diff --git a/lv2/lv2plug.in/ns/lv2core/lv2.h b/lv2/lv2plug.in/ns/lv2core/lv2.h index b2688c4..1d4da99 100644 --- a/lv2/lv2plug.in/ns/lv2core/lv2.h +++ b/lv2/lv2plug.in/ns/lv2core/lv2.h @@ -343,13 +343,22 @@ typedef struct _LV2_Descriptor { } LV2_Descriptor; /** + Helper macro needed for LV2_SYMBOL_EXPORT when using C++. +*/ +#ifdef __cplusplus +# define LV2_SYMBOL_EXTERN extern "C" +#else +# define LV2_SYMBOL_EXTERN +#endif + +/** Put this (LV2_SYMBOL_EXPORT) before any functions that are to be loaded by the host as a symbol from the dynamic library. */ #ifdef _WIN32 -# define LV2_SYMBOL_EXPORT __declspec(dllexport) +# define LV2_SYMBOL_EXPORT LV2_SYMBOL_EXTERN __declspec(dllexport) #else -# define LV2_SYMBOL_EXPORT +# define LV2_SYMBOL_EXPORT LV2_SYMBOL_EXTERN __attribute__((visibility("default"))) #endif /** diff --git a/lv2/lv2plug.in/ns/lv2core/lv2core.doap.ttl b/lv2/lv2plug.in/ns/lv2core/lv2core.doap.ttl index b9462c5..60c231e 100644 --- a/lv2/lv2plug.in/ns/lv2core/lv2core.doap.ttl +++ b/lv2/lv2plug.in/ns/lv2core/lv2core.doap.ttl @@ -22,6 +22,8 @@ dcs:changeset [ dcs:item [ rdfs:label "Relax domain of lv2:minimum lv2:maximum and lv2:default so they can be used to describe properties/parameters as well." + ] , [ + rdfs:label "Add extern C and visibility attribute to LV2_SYMBOL_EXPORT." ] ] ] , [ |