#include #ifdef FROM_LUAINTERFACE #define NO_DLL #endif #ifndef WIN32 #define WEAK __attribute__ ((weak)) #else #define WEAK #endif static void _init_plugin(Lua * L) { static bool done = false; if (done) return; done = true; LuaSQLConnection::pushstatics(L); } extern "C" { #ifndef NO_DLL WEAK void init_plugin(Lua * L) { _init_plugin(L); } #endif void luasql_init(Lua * L) { _init_plugin(L); } }