From 7d5f246ae7310055d39ea13ff395d830e3c27a60 Mon Sep 17 00:00:00 2001 From: Pixel Date: Tue, 3 Apr 2012 08:32:34 -0700 Subject: Opening all libraries in the LuaMainTask, and adding the LuaExecFile class. --- src/LuaTask.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src') diff --git a/src/LuaTask.cc b/src/LuaTask.cc index d722847..9a7e978 100644 --- a/src/LuaTask.cc +++ b/src/LuaTask.cc @@ -2,6 +2,16 @@ #include "Main.h" #include "TaskMan.h" +Balau::LuaMainTask::LuaMainTask() : m_stopping(false) { + L.open_base(); + L.open_table(); + L.open_string(); + L.open_math(); + L.open_debug(); + L.open_bit(); + L.open_jit(); +} + void Balau::LuaMainTask::exec(LuaExecCell * cell) { m_queue.push(cell); m_queueEvent.trigger(); @@ -43,3 +53,7 @@ void Balau::LuaExecCell::exec(LuaMainTask * mainTask) { void Balau::LuaExecString::run(Lua & L) { L.load(m_str); } + +void Balau::LuaExecFile::run(Lua & L) { + L.load(m_file); +} -- cgit v1.2.3