From 1f7366875618978aa9deb0e9a43f9532c6688e9a Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 3 Dec 2019 17:55:37 +0100 Subject: New approach for Lua bindings to avoid LuaBridge_API in GUI code Declare DoubleArray in GUI context so that runtime uses the symbol from the .exe (not the .dll). This is mainly for the benefit of MSVC, that does not allow to use LuaBridge_API in .exe --- gtk2_ardour/luainstance.cc | 36 +----------------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) (limited to 'gtk2_ardour/luainstance.cc') diff --git a/gtk2_ardour/luainstance.cc b/gtk2_ardour/luainstance.cc index d0529017ae..f1da28c826 100644 --- a/gtk2_ardour/luainstance.cc +++ b/gtk2_ardour/luainstance.cc @@ -62,41 +62,6 @@ static const char* ui_scripts_file_name = "ui_scripts"; -#ifdef PLATFORM_WINDOWS -/* see libs/ardour/luabindings.cc for details */ - -template -void const* -luabridge::ClassInfo::getStaticKey () -{ - static char value; - return &value; -} - -template -void const* -luabridge::ClassInfo::getClassKey () -{ - static char value; - return &value; -} - -template -void const* -luabridge::ClassInfo::getConstKey () -{ - static char value; - return &value; -} - -#define CLASSKEYS(CLS) \ - template void const* luabridge::ClassInfo< CLS >::getStaticKey(); \ - template void const* luabridge::ClassInfo< CLS >::getClassKey(); \ - template void const* luabridge::ClassInfo< CLS >::getConstKey(); - -CLASSKEYS(std::vector); -#endif - namespace LuaCairo { /** wrap RefPtr< Cairo::ImageSurface > * @@ -607,6 +572,7 @@ LuaInstance::bind_cairo (lua_State* L) */ luabridge::getGlobalNamespace (L) .beginNamespace ("C") + .registerArray ("DoubleArray") .beginStdVector ("DoubleVector") .endClass () .endNamespace (); -- cgit v1.2.3