From: John L. <jr...@us...> - 2007-12-04 05:20:33
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv16657/wxLua/modules/wxluadebug/src Modified Files: wxldebug.cpp wxlstack.cpp Log Message: After separating the tags, refs, and debug refs in the Lua registry rename the wxluaT_XXX functions to match what they operate on wxluaR_ for generic ref functions wxluaT_ for tag functions wxluaO_ for object functions Index: wxlstack.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/src/wxlstack.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** wxlstack.cpp 2 Dec 2007 20:57:34 -0000 1.21 --- wxlstack.cpp 4 Dec 2007 05:20:29 -0000 1.22 *************** *** 1022,1026 **** // refresh here and not in Expand/CollapseItem() to make ExpandItemChildren() faster. ! m_listCtrl->RefreshItem(list_item); } } --- 1022,1026 ---- // refresh here and not in Expand/CollapseItem() to make ExpandItemChildren() faster. ! m_listCtrl->RefreshItem(list_item); } } *************** *** 1114,1119 **** for (n = 0; n < count; n++) { ! wxLuaDebugItem *item = new wxLuaDebugItem(strArr[n].BeforeLast(wxT(' ')), WXLUAARG_None, ! wxT("Count ")+strArr[n].AfterLast(wxT(' ')), WXLUAARG_None, wxT(""), LUA_NOREF, debugItem->GetIndex() + 1); dataArr.Add(item); --- 1114,1119 ---- for (n = 0; n < count; n++) { ! wxLuaDebugItem *item = new wxLuaDebugItem(strArr[n].BeforeLast(wxT(' ')), WXLUAARG_None, ! wxT("Count ")+strArr[n].AfterLast(wxT(' ')), WXLUAARG_None, wxT(""), LUA_NOREF, debugItem->GetIndex() + 1); dataArr.Add(item); *************** *** 1240,1244 **** delete stkListData_n; ! n--; count = m_listData.GetCount(); } } --- 1240,1244 ---- delete stkListData_n; ! n--; count = m_listData.GetCount(); } } *************** *** 1304,1308 **** { int lua_ref = debugItem->GetReference(); ! int ok = m_wxlState.wxluaT_Remove(lua_ref); debugItem->SetReference(LUA_NOREF); --- 1304,1308 ---- { int lua_ref = debugItem->GetReference(); ! int ok = m_wxlState.wxluaR_Unref(lua_ref); debugItem->SetReference(LUA_NOREF); *************** *** 1319,1323 **** for (i = (int)m_luaReferences.GetCount()-1; i >= 0; --i) { ! bool ok = m_wxlState.wxluaT_Remove(m_luaReferences[i], &wxlua_lreg_debug_refs_key); wxCHECK_RET(ok, wxT("Unable to remove a reference in Lua")); //wxPrintf(wxT("Extra Lua reference in listctrl #%d ok %d ref %d count %d\n"), i, ok, m_luaReferences[i], m_luaReferences.GetCount()); --- 1319,1323 ---- for (i = (int)m_luaReferences.GetCount()-1; i >= 0; --i) { ! bool ok = m_wxlState.wxluaR_Unref(m_luaReferences[i], &wxlua_lreg_debug_refs_key); wxCHECK_RET(ok, wxT("Unable to remove a reference in Lua")); //wxPrintf(wxT("Extra Lua reference in listctrl #%d ok %d ref %d count %d\n"), i, ok, m_luaReferences[i], m_luaReferences.GetCount()); Index: wxldebug.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/src/wxldebug.cpp,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** wxldebug.cpp 3 Dec 2007 23:47:24 -0000 1.53 --- wxldebug.cpp 4 Dec 2007 05:20:29 -0000 1.54 *************** *** 139,143 **** if (ret == 0) // can be true for unnamed "(*temporary)" vars { ! ret = elem1->GetKeyType() - elem2->GetKeyType(); if (ret == 0) --- 139,143 ---- if (ret == 0) // can be true for unnamed "(*temporary)" vars { ! ret = elem1->GetKeyType() - elem2->GetKeyType(); if (ret == 0) *************** *** 221,228 **** // FIXME! local tables get the right values for GetTypeValue(...) ! // but when you run wxluaT_insert() to store them they disappear ! // so that the next time wxluaT_insert() is run it reuses the same // index as your local table. ! // When using the stack dialog the next wxluaT_insert() is the // global table which is very confusing. --- 221,228 ---- // FIXME! local tables get the right values for GetTypeValue(...) ! // but when you run wxluaR_ref() to store them they disappear ! // so that the next time wxluaR_ref() is run it reuses the same // index as your local table. ! // When using the stack dialog the next wxluaR_ref() is the // global table which is very confusing. *************** *** 281,285 **** { // push the table onto the stack to iterate through ! if (wxlState.wxluaT_Get(tableRef, &wxlua_lreg_debug_refs_key)) { if (lua_getmetatable(L, -1)) // if no metatable then nothing is pushed --- 281,285 ---- { // push the table onto the stack to iterate through ! if (wxlState.wxluaR_GetRef(tableRef, &wxlua_lreg_debug_refs_key)) { if (lua_getmetatable(L, -1)) // if no metatable then nothing is pushed *************** *** 330,339 **** if (lua_istable(L, stack_idx)) { ! nRef = wxluaT_isrefed(L, stack_idx, &wxlua_lreg_debug_refs_key); // don't duplicate refs if (nRef == LUA_NOREF) { if (flag_type) *flag_type |= WXLUA_DEBUGITEM_LUAREFED; ! nRef = wxluaT_insert(L, -1, &wxlua_lreg_debug_refs_key); references.Add(nRef); } --- 330,339 ---- if (lua_istable(L, stack_idx)) { ! nRef = wxluaR_isrefed(L, stack_idx, &wxlua_lreg_debug_refs_key); // don't duplicate refs if (nRef == LUA_NOREF) { if (flag_type) *flag_type |= WXLUA_DEBUGITEM_LUAREFED; ! nRef = wxluaR_ref(L, -1, &wxlua_lreg_debug_refs_key); references.Add(nRef); } *************** *** 430,434 **** lua_State* L = wxlState.GetLuaState(); ! int nTag = wxluaT_tag(L, stack_idx); int nItems = luaL_getn(L, stack_idx); const void *pItem = lua_topointer(L, stack_idx); --- 430,434 ---- lua_State* L = wxlState.GetLuaState(); ! int nTag = wxluaT_gettag(L, stack_idx); int nItems = luaL_getn(L, stack_idx); const void *pItem = lua_topointer(L, stack_idx); *************** *** 474,478 **** else // is full userdata { ! int nTag = wxluaT_tag(L, stack_idx); if (nTag != WXLUA_NOTAG) --- 474,478 ---- else // is full userdata { ! int nTag = wxluaT_gettag(L, stack_idx); if (nTag != WXLUA_NOTAG) |