From: John L. <jr...@us...> - 2009-10-01 04:21:11
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv4255/wxLua/modules/wxluadebug/src Modified Files: wxldebug.cpp Log Message: Removed %encapsulate and %noclassinfo tags for %classes in the bindings. No longer encapsulating non wxObjects in a wxObject class for deletion. We now provide delete functions for each class in the wxLuaBindClass structs to be called on the void* we get from Lua. Index: wxldebug.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/src/wxldebug.cpp,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -d -r1.67 -r1.68 *** wxldebug.cpp 24 Jun 2009 19:57:40 -0000 1.67 --- wxldebug.cpp 1 Oct 2009 04:21:02 -0000 1.68 *************** *** 406,411 **** else if (lightuserdata_reg_key == &wxlua_lreg_gcobjects_key) { ! wxObject* obj = (wxObject*)lua_touserdata(L, -1); ! name = wxString::Format(wxT("%s(%s)"), obj->GetClassInfo()->GetClassName(), name.c_str()); } } --- 406,428 ---- else if (lightuserdata_reg_key == &wxlua_lreg_gcobjects_key) { ! int wxl_type_ = (int)lua_tonumber(L, -1); ! name = wxString::Format(wxT("%s(%s)"), wxluaT_typename(L, wxl_type_).c_str(), name.c_str()); ! } ! else if (lightuserdata_reg_key == &wxlua_lreg_weakobjects_key) ! { ! wxString names_weak; ! ! // iterate the table of userdata ! lua_pushnil(L); ! while (lua_next(L, -2) != 0) ! { ! // value = -1, key = -2, table = -3 ! int wxl_type_weak = (int)lua_tonumber(L, -2); ! if (!names_weak.IsEmpty()) names_weak += wxT(", "); ! names_weak += wxString::Format(wxT("%s(%d)"), wxluaT_typename(L, wxl_type_weak).c_str(), wxl_type_weak); ! lua_pop(L, 1); // pop value, lua_next will pop key at end ! } ! ! name = wxString::Format(wxT("%s (%s)"), names_weak.c_str(), name.c_str()); } } |