From: John L. <jr...@us...> - 2009-06-24 19:57:44
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv4615/wxLua/modules/wxluasocket/src Modified Files: wxldserv.cpp wxldtarg.cpp wxlsock.cpp Log Message: More fixes for mysterious crash using MSVC release and wxString + operator wxT("a")+wxString("b")+wxT("c")+wxString("d")... Index: wxldtarg.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxldtarg.cpp,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** wxldtarg.cpp 26 Mar 2008 05:23:48 -0000 1.47 --- wxldtarg.cpp 24 Jun 2009 19:57:41 -0000 1.48 *************** *** 558,562 **** } ! lua_pop(L, 1); // removes `value'; } lua_settop(L, nOldTop); // the table of globals. --- 558,562 ---- } ! lua_pop(L, 1); // removes 'value'; } lua_settop(L, nOldTop); // the table of globals. *************** *** 572,576 **** wxLuaDebugData::GetTypeValue(m_wxlState, -1, &wxl_type, value); ! strResult = wxluaT_typename(L, wxl_type) + wxT(" : ") + value; lua_pop(L, 1); --- 572,576 ---- wxLuaDebugData::GetTypeValue(m_wxlState, -1, &wxl_type, value); ! strResult.Printf(wxT("%s : %s"), wxluaT_typename(L, wxl_type).c_str(), value.c_str()); lua_pop(L, 1); Index: wxldserv.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxldserv.cpp,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** wxldserv.cpp 22 Dec 2007 06:07:16 -0000 1.49 --- wxldserv.cpp 24 Jun 2009 19:57:41 -0000 1.50 *************** *** 539,547 **** if (!read_ok) { - wxString s = wxT("Failed reading from the debugger socket. ") + msg + wxT("\n"); - s += GetSocketErrorMsg(); - wxLuaDebuggerEvent debugEvent(wxEVT_WXLUA_DEBUGGER_DEBUGGEE_DISCONNECTED, this); ! debugEvent.SetMessage(s); SendEvent(debugEvent); } --- 539,544 ---- if (!read_ok) { wxLuaDebuggerEvent debugEvent(wxEVT_WXLUA_DEBUGGER_DEBUGGEE_DISCONNECTED, this); ! debugEvent.SetMessage(wxString::Format(wxT("Failed reading from the debugger socket. %s\n"), msg.c_str(), GetSocketErrorMsg().c_str())); SendEvent(debugEvent); } *************** *** 553,561 **** if (!write_ok) { - wxString s = wxT("Failed writing to the debugger socket. ") + msg + wxT("\n"); - s += GetSocketErrorMsg(); - wxLuaDebuggerEvent debugEvent(wxEVT_WXLUA_DEBUGGER_DEBUGGEE_DISCONNECTED, this); ! debugEvent.SetMessage(s); SendEvent(debugEvent); } --- 550,555 ---- if (!write_ok) { wxLuaDebuggerEvent debugEvent(wxEVT_WXLUA_DEBUGGER_DEBUGGEE_DISCONNECTED, this); ! debugEvent.SetMessage(wxString::Format(wxT("Failed writing to the debugger socket. %s\n%s"), msg.c_str(), GetSocketErrorMsg().c_str())); SendEvent(debugEvent); } Index: wxlsock.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxlsock.cpp,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** wxlsock.cpp 13 Dec 2007 00:47:53 -0000 1.34 --- wxlsock.cpp 24 Jun 2009 19:57:41 -0000 1.35 *************** *** 83,92 **** { #ifdef __WXMSW__ // no console in MSW ! wxLuaCharBuffer buf(title+ wxString::Format(wxT(" PID %ld TIME %s "), (long)wxGetProcessId(), wxT(__TIME__)) + msg + wxT("\n")); FILE* h = fopen("wxLua_socketdebug.log", "a"); fprintf(h, buf.GetData()); fclose(h); #else // !__WXMSW__ ! wxSafeShowMessage(title, wxString::Format(wxT("PID %ld TIME %s\n\t"), (long)wxGetProcessId(), wxT(__TIME__)) + msg); #endif // __WXMSW__ } --- 83,92 ---- { #ifdef __WXMSW__ // no console in MSW ! wxLuaCharBuffer buf(wxString::Format(wxT("%s PID %ld TIME %s %s\n"), title.c_str(), (long)wxGetProcessId(), wxT(__TIME__), msg.c_str())); FILE* h = fopen("wxLua_socketdebug.log", "a"); fprintf(h, buf.GetData()); fclose(h); #else // !__WXMSW__ ! wxSafeShowMessage(title, wxString::Format(wxT("PID %ld TIME %s\n\t%s"), (long)wxGetProcessId(), wxT(__TIME__), msg.c_str())); #endif // __WXMSW__ } |