diff options
Diffstat (limited to '')
-rw-r--r-- | source/LuaState.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
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); |