From: John L. <jr...@us...> - 2005-12-22 18:42:42
|
Update of /cvsroot/wxlua/wxLua/apps/wxlua/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19516/wxLua/apps/wxlua/src Modified Files: wxlua.cpp wxlua.h Log Message: Removed the wxLuaInterpreter - all functions transferred to the wxLuaState wxLuaInterpreter is typedefed to wxLuaState temporarily Index: wxlua.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxlua/src/wxlua.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** wxlua.cpp 12 Dec 2005 05:16:31 -0000 1.11 --- wxlua.cpp 22 Dec 2005 18:42:33 -0000 1.12 *************** *** 124,132 **** // Initialize lua ! m_luaInterpreter = new wxLuaInterpreter(this, -1); ! m_luaState = m_luaInterpreter->GetLuaState(); m_luaHandler = new LuaHandler(this); ! if (m_luaInterpreter->Ok()) { RegisterClasses(m_luaState); --- 124,132 ---- // Initialize lua ! m_wxlState = wxLuaState(this, -1); ! m_luaState = m_wxlState.GetLuaState(); m_luaHandler = new LuaHandler(this); ! if (m_wxlState.Ok()) { RegisterClasses(m_luaState); *************** *** 218,222 **** { CreateSimpleArgs(); ! if (m_luaInterpreter->RunFile(argv[1]) == 0) fOk = TRUE; } --- 218,222 ---- { CreateSimpleArgs(); ! if (m_wxlState.RunFile(argv[1]) == 0) fOk = TRUE; } *************** *** 255,259 **** lua_setglobal(m_luaState, "args"); ! if (m_luaInterpreter->RunFile(fileName) == 0) fOk = TRUE; --- 255,259 ---- lua_setglobal(m_luaState, "args"); ! if (m_wxlState.RunFile(fileName) == 0) fOk = TRUE; *************** *** 284,288 **** { CreateSimpleArgs(); ! if (m_luaInterpreter->RunFile(argv[idx]) == 0) fOk = TRUE; } --- 284,288 ---- { CreateSimpleArgs(); ! if (m_wxlState.RunFile(argv[idx]) == 0) fOk = TRUE; } *************** *** 311,315 **** wxMemoryFSHandler::RemoveFile(wxT("wxLua")); ! delete m_luaInterpreter; delete m_luaHandler; m_luaState = NULL; --- 311,315 ---- wxMemoryFSHandler::RemoveFile(wxT("wxLua")); ! m_wxlState.Destroy(); delete m_luaHandler; m_luaState = NULL; *************** *** 383,387 **** lua_setglobal(m_luaState, "standaloneLoadBitmaps"); */ ! return m_luaInterpreter->RunBuffer(wxLuaEditor, wxLuaEditor_len, g_strProgramName); } --- 383,387 ---- lua_setglobal(m_luaState, "standaloneLoadBitmaps"); */ ! return m_wxlState.RunBuffer(wxLuaEditor, wxLuaEditor_len, g_strProgramName); } Index: wxlua.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxlua/src/wxlua.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** wxlua.h 1 Dec 2005 04:17:28 -0000 1.8 --- wxlua.h 22 Dec 2005 18:42:33 -0000 1.9 *************** *** 68,72 **** wxLuaStackFrame *m_pStackFrame; LuaHandler *m_luaHandler; ! wxLuaInterpreter *m_luaInterpreter; lua_State *m_luaState; #ifdef __WXMSW__ --- 68,72 ---- wxLuaStackFrame *m_pStackFrame; LuaHandler *m_luaHandler; ! wxLuaState m_wxlState; lua_State *m_luaState; #ifdef __WXMSW__ |