From: John L. <jr...@us...> - 2007-11-30 23:00:19
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv22316/wxLua/modules/wxluasocket/src Modified Files: wxldtarg.cpp Log Message: - wxLuaStackDialog has better search for all columns, collapse and expand tables, and show metatables. It also now uses a virtual wxListCtrl so it's much faster. - Separated the "tags" for C++ classes from "refs" for objects we want a handle on in the Lua registry by putting them in separate tables. - Removed wxlua_pushkey_XXX #defines since we now have a few tables in the registry that we use and those methods were not useful anymore. The lightuserdata keys are now const char* strings with a descriptive name, however only the mem address is used as the table key. - wxluaT_newtag() now leaves the created table on the stack. - Removed wxluaT_newweaktag() and wxluaT_settagmethod() since they were not needed anymore. Index: wxldtarg.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxldtarg.cpp,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** wxldtarg.cpp 28 Nov 2007 22:55:02 -0000 1.41 --- wxldtarg.cpp 30 Nov 2007 23:00:08 -0000 1.42 *************** *** 322,326 **** { int iItem = m_references.Item(idx); ! m_wxlState.wxluaT_Remove(iItem); } m_references.Clear(); --- 322,326 ---- { int iItem = m_references.Item(idx); ! m_wxlState.wxluaT_Remove(iItem, &wxlua_lreg_debug_refs_key); } m_references.Clear(); *************** *** 509,513 **** lua_pushliteral(L, "OK"); ! nReference = m_wxlState.wxluaT_Insert(-1); lua_settop(L, nOldTop); // throw out all return values } --- 509,513 ---- lua_pushliteral(L, "OK"); ! nReference = m_wxlState.wxluaT_Insert(-1, &wxlua_lreg_refs_key); lua_settop(L, nOldTop); // throw out all return values } *************** *** 526,534 **** if (strExpr == name) { ! nReference = m_wxlState.wxluaT_Insert(-1); fFound = true; break; } ! lua_pop(L, 1); } --- 526,534 ---- if (strExpr == name) { ! nReference = m_wxlState.wxluaT_Insert(-1, &wxlua_lreg_refs_key); fFound = true; break; } ! lua_pop(L, 1); } *************** *** 552,556 **** if (strExpr == name) { ! nReference = m_wxlState.wxluaT_Insert(-1); // reference value lua_pop(L, 2); // pop key and value fFound = true; --- 552,556 ---- if (strExpr == name) { ! nReference = m_wxlState.wxluaT_Insert(-1, &wxlua_lreg_refs_key); // reference value lua_pop(L, 2); // pop key and value fFound = true; *************** *** 565,575 **** } ! if (m_wxlState.wxluaT_Get(nReference)) { ! m_wxlState.wxluaT_Remove(nReference); int wxl_type = 0; wxString value; ! int l_type = wxLuaDebugData::GetTypeValue(m_wxlState, -1, &wxl_type, value); strResult = wxlua_getwxluatypename(wxl_type) + wxT(" : ") + value; --- 565,575 ---- } ! if (m_wxlState.wxluaT_Get(nReference, &wxlua_lreg_refs_key)) { ! m_wxlState.wxluaT_Remove(nReference, &wxlua_lreg_refs_key); int wxl_type = 0; wxString value; ! wxLuaDebugData::GetTypeValue(m_wxlState, -1, &wxl_type, value); strResult = wxlua_getwxluatypename(wxl_type) + wxT(" : ") + value; *************** *** 662,666 **** int lineNumber = 0; wxString fileName; ! if (!(m_forceBreak && m_resetRequested)) { --- 662,666 ---- int lineNumber = 0; wxString fileName; ! if (!(m_forceBreak && m_resetRequested)) { |