From eb323166d9ae600fe422725ea29575ba4613b6d2 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Thu, 8 Aug 2013 16:30:02 +0200 Subject: Removed LuaScript. The WebAdmin now uses LuaState directly to call the one function it needs. --- source/LuaState.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'source/LuaState.cpp') diff --git a/source/LuaState.cpp b/source/LuaState.cpp index 83581d19a..367a04266 100644 --- a/source/LuaState.cpp +++ b/source/LuaState.cpp @@ -599,6 +599,32 @@ void cLuaState::Push(const HTTPRequest * a_Request) +void cLuaState::Push(cWebAdmin * a_WebAdmin) +{ + ASSERT(IsValid()); + ASSERT(m_NumCurrentFunctionArgs >= 0); // A function must be pushed to stack first + + tolua_pushusertype(m_LuaState, a_WebAdmin, "cWebAdmin"); + m_NumCurrentFunctionArgs += 1; +} + + + + + +void cLuaState::Push(const HTTPTemplateRequest * a_Request) +{ + ASSERT(IsValid()); + ASSERT(m_NumCurrentFunctionArgs >= 0); // A function must be pushed to stack first + + tolua_pushusertype(m_LuaState, (void *)a_Request, "HTTPTemplateRequest"); + m_NumCurrentFunctionArgs += 1; +} + + + + + void cLuaState::GetReturn(int a_StackPos, bool & a_ReturnedVal) { a_ReturnedVal = (tolua_toboolean(m_LuaState, a_StackPos, a_ReturnedVal ? 1 : 0) > 0); -- cgit v1.2.3