Mercurial > hg > vamp-plugin-sdk
diff vamp-hostsdk/hostguard.h @ 263:4454843ff384
* OK, we're going to have to place the host stuff in its own namespace
too. Otherwise our new SV build on OSX fails to load old plugins
because they pull in the host namespace PluginBase and thus report
the wrong Vamp version... *sigh*
author | cannam |
---|---|
date | Thu, 20 Nov 2008 15:01:30 +0000 |
parents | 7b12c3decc42 |
children | d5c5a52e6c9f |
line wrap: on
line diff
--- a/vamp-hostsdk/hostguard.h Fri Nov 14 14:20:47 2008 +0000 +++ b/vamp-hostsdk/hostguard.h Thu Nov 20 15:01:30 2008 +0000 @@ -40,8 +40,30 @@ #ifdef _VAMP_IN_PLUGINSDK #error You have included headers from both vamp-sdk and vamp-hostsdk in the same source file. Please include only vamp-sdk headers in plugin code, and only vamp-hostsdk headers in host code. #else + #define _VAMP_IN_HOSTSDK + +#ifdef _VAMP_NO_HOST_NAMESPACE +#define _VAMP_SDK_HOSTSPACE_BEGIN(h) +#define _VAMP_SDK_HOSTSPACE_END(h) +#define _VAMP_SDK_PLUGSPACE_BEGIN(h) +#define _VAMP_SDK_PLUGSPACE_END(h) +#else +#define _VAMP_SDK_HOSTSPACE_BEGIN(h) \ + namespace _VampHost { + +#define _VAMP_SDK_HOSTSPACE_END(h) \ + } \ + using namespace _VampHost; +#define _VAMP_SDK_PLUGSPACE_BEGIN(h) \ + namespace _VampHost { + +#define _VAMP_SDK_PLUGSPACE_END(h) \ + } \ + using namespace _VampHost; #endif #endif +#endif +