Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/src
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv25933/modules/wxluadebug/src
Modified Files:
wxldebug.cpp
Log Message:
Switch s_wxluaarg_Enumeration to s_wxluaarg_Enum
Add the rest of the LUA_TXXX types as s_wxluaarg_XXX and create #defines
as well as functions to verify them with the result of lua_type()
Unify all of the wxlua_isXXXtype functions to all call the same function
Get rid of wxLuaStringToLongHashMap in wxlstate.h and don't use it anymore
in wxLuaCheckStack since we can just use a wxSortedArrayString
Remove wxLuaState::GetBaseLuaClass since it wasn't used anywhere
Cleanup wxLuaState::CallOverloadedFunction to use new check function
Index: wxldebug.cpp
===================================================================
RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/src/wxldebug.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** wxldebug.cpp 31 May 2007 17:18:54 -0000 1.31
--- wxldebug.cpp 6 Jun 2007 03:53:40 -0000 1.32
***************
*** 488,495 ****
lua_State* L = m_luaState;
! wxLuaStringToLongHashMap dumpList;
lua_pushvalue(L, LUA_GLOBALSINDEX);
! DumpTable(lua_gettop(L), wxT("Globals"), dumpList, 0);
lua_pop(L, 1);
}
--- 488,495 ----
lua_State* L = m_luaState;
! wxSortedArrayString tableArray;
lua_pushvalue(L, LUA_GLOBALSINDEX);
! DumpTable(lua_gettop(L), wxT("Globals"), tableArray, 0);
lua_pop(L, 1);
}
***************
*** 500,512 ****
lua_State* L = m_luaState;
! wxLuaStringToLongHashMap dumpList;
lua_pushstring(L, wx2lua(name));
lua_gettable(L, LUA_GLOBALSINDEX);
! DumpTable(lua_gettop(L), name, dumpList, 0);
lua_pop(L, 1);
}
! void wxLuaCheckStack::DumpTable(int index, const wxString& tablename, wxLuaStringToLongHashMap& dumpList, int indent)
{
wxCHECK_RET(m_luaState, wxT("Invalid lua_State"));
--- 500,512 ----
lua_State* L = m_luaState;
! wxSortedArrayString tableArray;
lua_pushstring(L, wx2lua(name));
lua_gettable(L, LUA_GLOBALSINDEX);
! DumpTable(lua_gettop(L), name, tableArray, 0);
lua_pop(L, 1);
}
! void wxLuaCheckStack::DumpTable(int index, const wxString& tablename, wxSortedArrayString& tableArray, int indent)
{
wxCHECK_RET(m_luaState, wxT("Invalid lua_State"));
***************
*** 545,561 ****
OutputMsg(info);
! if (dumpList.find(value) != dumpList.end())
{
if (valueType == wxT("Table"))
{
wxString tname = wxString::Format(wxT("%s.%s"), tablename.c_str(), indexValue.c_str());
! dumpList[value] = 1;
int tableIndex = lua_gettop(L);
// lua_pushvalue(L, lua_gettop(L));
! DumpTable(tableIndex, tname, dumpList, indent+1);
}
else
{
! dumpList[value] = 1;
}
}
--- 545,561 ----
OutputMsg(info);
! if (tableArray.Index(value) == wxNOT_FOUND)
{
if (valueType == wxT("Table"))
{
wxString tname = wxString::Format(wxT("%s.%s"), tablename.c_str(), indexValue.c_str());
! tableArray.Add(value);
int tableIndex = lua_gettop(L);
// lua_pushvalue(L, lua_gettop(L));
! DumpTable(tableIndex, tname, tableArray, indent+1);
}
else
{
! tableArray.Add(value);
}
}
|