Fix LuaBindings TypeList copy-ctor
[ardour.git] / libs / lua / LuaBridge / detail / ClassInfo.h
index 8639dbec522453d80fdb182c18ac0b85ef72df59..8507591bcfbec273d881b59a4dd7aa53e2fa6333 100644 (file)
 */
 //==============================================================================
 
+#ifdef COMPILER_MSVC
+#ifdef LIBARDOUR_DLL_EXPORTS
+# define LuaBridge_API __declspec(dllexport)
+#else
+# define LuaBridge_API __declspec(dllimport)
+#endif
+#else
+# define LuaBridge_API // mingw is sane WRT to static class members
+#endif
+
 /** Unique Lua registry keys for a class.
 
     Each registered class inserts three keys into the registry, whose
     allows a quick and reliable lookup for a metatable from a template type.
 */
 template <class T>
-class ClassInfo
+class LuaBridge_API ClassInfo
 {
 public:
+#ifdef PLATFORM_WINDOWS
+       /* static symbols on windows (even identical symbols) are not
+        * mapped to the same address when mixing .dll + .exe.
+        * the implementation is moved to libardour/gtk2_ardour.
+        */
+  static void const* getStaticKey ();
+  static void const* getClassKey ();
+  static void const* getConstKey ();
+#else
   /** Get the key for the static table.
 
       The static table holds the static data members, static properties, and
@@ -69,5 +88,6 @@ public:
     static char value;
     return &value;
   }
+#endif
 };