From 499962029a94074ecd007a1be5f760337ff9ffbb Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sun, 7 Apr 2013 19:28:32 +0000 Subject: Added SQLite and LuaSQLite, Lua plugins can now use SQLite. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1368 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Plugin_NewLua.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'source/Plugin_NewLua.cpp') diff --git a/source/Plugin_NewLua.cpp b/source/Plugin_NewLua.cpp index 6b5e233f6..dc3f62c6b 100644 --- a/source/Plugin_NewLua.cpp +++ b/source/Plugin_NewLua.cpp @@ -18,6 +18,16 @@ extern "C" +// fwd: SQLite/lsqlite3.c +extern "C" +{ + LUALIB_API int luaopen_lsqlite3(lua_State * L); +} + + + + + bool report_errors(lua_State * lua, int status) { if (status == 0) @@ -73,6 +83,7 @@ bool cPlugin_NewLua::Initialize(void) luaL_openlibs(m_LuaState); tolua_AllToLua_open(m_LuaState); ManualBindings::Bind(m_LuaState); + luaopen_lsqlite3(m_LuaState); // Inject the identification global variables into the state: lua_pushlightuserdata(m_LuaState, this); -- cgit v1.2.3