Mercurial > hg > vamp-plugin-sdk
diff vamp/vamp.h @ 160:e841e2365b48
* Some work on symbol visibility in the shared object
author | cannam |
---|---|
date | Thu, 03 Jul 2008 13:28:57 +0000 |
parents | 933fee59d33a |
children | 7fc1041daa9d |
line wrap: on
line diff
--- a/vamp/vamp.h Mon Jun 30 17:00:43 2008 +0000 +++ b/vamp/vamp.h Thu Jul 03 13:28:57 2008 +0000 @@ -312,6 +312,15 @@ } VampPluginDescriptor; + +#ifdef __GNUC__ +#pragma GCC visibility push(default) +#endif +#ifdef __MSVC__ +__declspec(dllexport) +#endif + + /** Get the descriptor for a given plugin index in this library. Return NULL if the index is outside the range of valid indices for this plugin library. @@ -324,10 +333,20 @@ field for its actual compatibility level, the host should be able to do the right thing with it: use it if possible, discard it otherwise. + + This is the only symbol that a Vamp plugin actually needs to + export from its shared object; all others can be hidden. See the + accompanying documentation for notes on how to achieve this with + certain compilers. */ const VampPluginDescriptor *vampGetPluginDescriptor (unsigned int hostApiVersion, unsigned int index); + +#ifdef __GNUC__ +#pragma GCC visibility pop +#endif + /** Function pointer type for vampGetPluginDescriptor. */ typedef const VampPluginDescriptor *(*VampGetPluginDescriptorFunction) (unsigned int, unsigned int);