From: John L. <jr...@us...> - 2006-05-25 22:50:19
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv27299/wxLua/modules/wxluadebug/src Modified Files: wxldebug.cpp Log Message: add all conditions to genwxbind.lua add more wxLUA_USE_XXX Add wxJoystick, wxBusyInfo, wxPasswordEntryDialog, wxSplashScreen remove duplicate code in wxldebug.cpp Index: wxldebug.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/src/wxldebug.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** wxldebug.cpp 2 May 2006 05:25:06 -0000 1.13 --- wxldebug.cpp 25 May 2006 22:50:05 -0000 1.14 *************** *** 24,28 **** #include "wxluadebug/include/wxldebug.h" - #include "wxlua/include/internal.h" // ---------------------------------------------------------------------------- --- 24,27 ---- *************** *** 220,266 **** wxString source; ! // get the index ! switch (lua_type(L, -2)) ! { ! case LUA_TNIL: ! name = wxT("Nil"); ! break; ! ! case LUA_TBOOLEAN: ! name = MakeBoolean(lua_toboolean(L, -2)); ! break; ! ! case LUA_TNUMBER: ! name = MakeNumber(lua_tonumber(L, -2)); ! break; ! ! case LUA_TSTRING: ! name = lua2wx(lua_tostring(L, -2)); ! break; ! ! case LUA_TTABLE: ! name = GetTableInfo(wxlState, -2); ! break; ! ! case LUA_TFUNCTION: ! if (lua_iscfunction(L, -2)) ! name.Printf(wxT("%p"), lua_tocfunction(L, -2)); ! else ! name.Printf(wxT("%p"), lua_topointer(L, -2)); ! break; ! ! case LUA_TUSERDATA: ! name = GetUserDataInfo(wxlState, -2); ! break; ! ! case LUA_TLIGHTUSERDATA: ! name = GetUserDataInfo(wxlState, -2, false); ! break; ! ! case LUA_TTHREAD: ! name.Printf(wxT("%p"), lua_topointer(L, -2)); ! break; ! } ! // get the type and value GetTypeValue(wxlState, -1, type, value); --- 219,224 ---- wxString source; ! // get the index, just want the name=value, type is dummy here ! GetTypeValue(wxlState, -2, type, name); // get the type and value GetTypeValue(wxlState, -1, type, value); *************** *** 295,299 **** wxCHECK_MSG(wxlState.Ok(), 0, wxT("Invalid wxLuaState")); lua_State* L = wxlState.GetLuaState(); ! int l_type = lua_type(L, -1); switch (l_type) --- 253,257 ---- wxCHECK_MSG(wxlState.Ok(), 0, wxT("Invalid wxLuaState")); lua_State* L = wxlState.GetLuaState(); ! int l_type = lua_type(L, index); switch (l_type) *************** *** 306,337 **** case LUA_TBOOLEAN: type = wxT("Boolean"); ! value = MakeBoolean(lua_toboolean(L, -1)); break; case LUA_TNUMBER: type = wxT("Number"); ! value = MakeNumber(lua_tonumber(L, -1)); break; case LUA_TSTRING: type = wxT("String"); ! value = lua2wx(lua_tostring(L, -1)); break; case LUA_TTABLE: type = wxT("Table"); ! value = GetTableInfo(wxlState, -1); break; case LUA_TFUNCTION: ! if (lua_iscfunction(L, -1)) { type = wxT("C Function"); ! value.Printf(wxT("%p"), lua_tocfunction(L, -1)); } else { type = wxT("Lua Function"); ! value.Printf(wxT("%p"), lua_topointer(L, -1)); } break; --- 264,295 ---- case LUA_TBOOLEAN: type = wxT("Boolean"); ! value = MakeBoolean(lua_toboolean(L, index)); break; case LUA_TNUMBER: type = wxT("Number"); ! value = MakeNumber(lua_tonumber(L, index)); break; case LUA_TSTRING: type = wxT("String"); ! value = lua2wx(lua_tostring(L, index)); break; case LUA_TTABLE: type = wxT("Table"); ! value = GetTableInfo(wxlState, index); break; case LUA_TFUNCTION: ! if (lua_iscfunction(L, index)) { type = wxT("C Function"); ! value.Printf(wxT("0x%p"), lua_tocfunction(L, index)); } else { type = wxT("Lua Function"); ! value.Printf(wxT("0x%p"), lua_topointer(L, index)); } break; *************** *** 339,353 **** case LUA_TUSERDATA: type = wxT("User Data"); ! value = GetUserDataInfo(wxlState, -1); break; case LUA_TLIGHTUSERDATA: type = wxT("Light User Data"); ! value = GetUserDataInfo(wxlState, -1, false); break; case LUA_TTHREAD: type = wxT("Thread"); ! value.Printf(wxT("%p"), lua_topointer(L, -1)); break; } --- 297,311 ---- case LUA_TUSERDATA: type = wxT("User Data"); ! value = GetUserDataInfo(wxlState, index); break; case LUA_TLIGHTUSERDATA: type = wxT("Light User Data"); ! value = GetUserDataInfo(wxlState, index, false); break; case LUA_TTHREAD: type = wxT("Thread"); ! value.Printf(wxT("0x%p"), lua_topointer(L, index)); break; } *************** *** 383,389 **** if (nItems == 0) ! return wxString::Format(wxT("%p"), pItem); ! return wxString::Format(wxT("%p (approx %u items)"), pItem, nItems); } --- 341,347 ---- if (nItems == 0) ! return wxString::Format(wxT("0x%p"), pItem); ! return wxString::Format(wxT("0x%p (approx %u items)"), pItem, nItems); } *************** *** 402,411 **** if (pTagName != NULL) ! return wxString::Format(wxT("%p (%s)"), lua_touserdata(L, index), lua2wx(pTagName).c_str()); ! return wxString::Format(wxT("%p (%u)"), lua_touserdata(L, index), nTag); } ! return wxString::Format(wxT("%p"), lua_touserdata(L, index)); } --- 360,369 ---- if (pTagName != NULL) ! return wxString::Format(wxT("0x%p (%s)"), lua_touserdata(L, index), lua2wx(pTagName).c_str()); ! return wxString::Format(wxT("0x%p (%u)"), lua_touserdata(L, index), nTag); } ! return wxString::Format(wxT("0x%p"), lua_touserdata(L, index)); } |