Browse Source

Add extern/visibility to LV2_SYMBOL_EXPORT.

zrythm_meson
David Robillard 8 years ago
parent
commit
61ee1b13fd
  1. 13
      lv2/lv2plug.in/ns/lv2core/lv2.h
  2. 2
      lv2/lv2plug.in/ns/lv2core/lv2core.doap.ttl

13
lv2/lv2plug.in/ns/lv2core/lv2.h

@ -342,14 +342,23 @@ typedef struct _LV2_Descriptor { @@ -342,14 +342,23 @@ typedef struct _LV2_Descriptor {
const void * (*extension_data)(const char * uri);
} 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
/**

2
lv2/lv2plug.in/ns/lv2core/lv2core.doap.ttl

@ -22,6 +22,8 @@ @@ -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."
]
]
] , [

Loading…
Cancel
Save