From: John L. <jr...@us...> - 2008-01-15 01:04:07
|
Update of /cvsroot/wxlua/wxLua/modules/luamodule/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv3556/wxLua/modules/luamodule/src Modified Files: luamodule.cpp Log Message: * Changed wxLuaState_Type enum for wxLuaState(lua_State*, wxLuaState_Type) Removed wxLUASTATE_USESTATE and you now | together wxLUASTATE_SETSTATE with wxLUASTATE_OPENBINDINGS if you want the bindings opened. Cleans up the creation of the wxLuaState so a precreated lua_State should be able to be used easier. - Remove poorly named wxLuaState::LuaError() and CheckRunError() and replaced them with the C functions wxlua_errorinfo() and wxlua_LUA_ERR_msg() respectively. - Added wxlua_pushargs(wxChar**, int) for a standard way to push args into Lua. - Copy Lua's print() function to print_lua() instead of simply overwriting it in case someone really wants to use it. Index: luamodule.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/luamodule/src/luamodule.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** luamodule.cpp 14 Aug 2007 13:42:15 -0000 1.7 --- luamodule.cpp 15 Jan 2008 01:04:04 -0000 1.8 *************** *** 35,39 **** // Override the base class virtual functions virtual bool OnInit(); ! virtual int OnExit(); virtual int MainLoop(); --- 35,39 ---- // Override the base class virtual functions virtual bool OnInit(); ! //virtual int OnExit(); virtual int MainLoop(); *************** *** 65,75 **** } - int wxLuaModuleApp::OnExit() - { - int retval = 0; - wxApp::OnExit(); - return retval; - } - int wxLuaModuleApp::MainLoop() { --- 65,68 ---- *************** *** 92,96 **** wxMessageBox(errorStr, wxT("wxLua")); #else ! wxPrintf(wxT("%s\n"), errorStr.c_str()); #endif } --- 85,89 ---- wxMessageBox(errorStr, wxT("wxLua")); #else ! wxPrintf(wxT("%s\n"), errorStr.c_str()); fflush(stdout); #endif } *************** *** 107,123 **** if (!s_wxlState.Ok()) { ! int argc = 0; ! wxChar **argv = NULL; if (!wxEntryStart(argc, argv)) ! { ! wxPrintf(wxT("Error calling wxEntryStart(argc, argv), aborting.\n")); ! return 0; ! } ! if (!wxTheApp || !wxTheApp->CallOnInit()) ! { ! wxPrintf(wxT("Error calling wxTheApp->CallOnInit(), aborting.\n")); ! return 0; ! } wxTheApp->SetExitOnFrameDelete(true); --- 100,116 ---- if (!s_wxlState.Ok()) { ! int argc = 0; ! wxChar **argv = NULL; if (!wxEntryStart(argc, argv)) ! { ! wxPrintf(wxT("Error calling wxEntryStart(argc, argv), aborting.\n")); ! return 0; ! } ! if (!wxTheApp || !wxTheApp->CallOnInit()) ! { ! wxPrintf(wxT("Error calling wxTheApp->CallOnInit(), aborting.\n")); ! return 0; ! } wxTheApp->SetExitOnFrameDelete(true); |