1
0

Removed LuaScript.

The WebAdmin now uses LuaState directly to call the one function it needs.
This commit is contained in:
madmaxoft
2013-08-08 16:30:02 +02:00
parent cc920ea929
commit eb323166d9
7 changed files with 128 additions and 181 deletions

View File

@@ -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);