From: John L. <jr...@us...> - 2007-12-07 02:24:59
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv18014/wxLua/modules/wxlua/src Modified Files: wxlbind.cpp wxlstate.cpp Log Message: Unicode fixes Index: wxlstate.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v retrieving revision 1.145 retrieving revision 1.146 diff -C2 -d -r1.145 -r1.146 *** wxlstate.cpp 7 Dec 2007 02:13:14 -0000 1.145 --- wxlstate.cpp 7 Dec 2007 02:24:56 -0000 1.146 *************** *** 344,348 **** lua_rawget(L, -2); // get t[key] = value; pop key push value ! if (lua_isnumber(L, -1)) tag = (int)lua_tonumber(L, -1); --- 344,348 ---- lua_rawget(L, -2); // get t[key] = value; pop key push value ! if (lua_isnumber(L, -1)) tag = (int)lua_tonumber(L, -1); *************** *** 587,592 **** } lua_pop(L, 1); // pop nil ! ! // Then add it lua_pushlightuserdata(L, (void*)obj_ptr); // push key lua_pushlightuserdata(L, wxobj); // push value --- 587,592 ---- } lua_pop(L, 1); // pop nil ! ! // Then add it lua_pushlightuserdata(L, (void*)obj_ptr); // push key lua_pushlightuserdata(L, wxobj); // push value *************** *** 611,615 **** lua_pushnil(L); // push value lua_rawset(L, -3); // set t[key] = nil; pops key and value ! lua_pop(L, 1); // pop objects table } --- 611,615 ---- lua_pushnil(L); // push value lua_rawset(L, -3); // set t[key] = nil; pops key and value ! lua_pop(L, 1); // pop objects table } *************** *** 629,633 **** } ! lua_pop(L, 1); // pop lightuserdata lua_pushlightuserdata(L, obj_ptr); // push key --- 629,633 ---- } ! lua_pop(L, 1); // pop lightuserdata lua_pushlightuserdata(L, obj_ptr); // push key *************** *** 682,686 **** void LUACALL wxluaW_addtrackedwindow(lua_State *L, wxObject* obj) { ! if (!obj) false; // allow NULL w/o error // don't track these "windows" since they're supposed to be attached --- 682,686 ---- void LUACALL wxluaW_addtrackedwindow(lua_State *L, wxObject* obj) { ! if (!obj) return; // allow NULL w/o error // don't track these "windows" since they're supposed to be attached *************** *** 732,736 **** if (lua_isnumber(L, -1)) { ! lua_pop(L, 2); // pop topwindows table and value return true; } --- 732,736 ---- if (lua_isnumber(L, -1)) { ! lua_pop(L, 2); // pop topwindows table and value return true; } *************** *** 1172,1176 **** else if (wxlua_iswxuserdata(L, stack_idx)) { ! int arrstr_tag = wxluaT_gettag(L, wxT("wxArrayString")); if (wxlua_isuserdatatype(L, stack_idx, arrstr_tag)) --- 1172,1176 ---- else if (wxlua_iswxuserdata(L, stack_idx)) { ! int arrstr_tag = wxluaT_gettag(L, "wxArrayString"); if (wxlua_isuserdatatype(L, stack_idx, arrstr_tag)) *************** *** 1208,1212 **** else if (wxlua_iswxuserdata(L, stack_idx)) { ! int arrstr_tag = wxluaT_gettag(L, wxT("wxArrayString")); if (wxlua_isuserdatatype(L, stack_idx, arrstr_tag)) --- 1208,1212 ---- else if (wxlua_iswxuserdata(L, stack_idx)) { ! int arrstr_tag = wxluaT_gettag(L, "wxArrayString"); if (wxlua_isuserdatatype(L, stack_idx, arrstr_tag)) *************** *** 1267,1271 **** else if (wxlua_iswxuserdata(L, stack_idx)) { ! int arrint_tag = wxluaT_gettag(L, wxT("wxArrayInt")); if (wxlua_isuserdatatype(L, stack_idx, arrint_tag)) --- 1267,1271 ---- else if (wxlua_iswxuserdata(L, stack_idx)) { ! int arrint_tag = wxluaT_gettag(L, "wxArrayInt"); if (wxlua_isuserdatatype(L, stack_idx, arrint_tag)) *************** *** 1450,1454 **** //---------------------------------------------------------------------------- ! // Other functions for wxLua's keys in the //---------------------------------------------------------------------------- --- 1450,1454 ---- //---------------------------------------------------------------------------- ! // Other functions for wxLua's keys in the //---------------------------------------------------------------------------- *************** *** 1628,1637 **** lua_pushnil(L); lua_rawset(L, -3); // set t[key] = nil to remove it ! try_again = true; break; } ! else lua_pop(L, 1); // pop value, lua_next will pop key at end } --- 1628,1637 ---- lua_pushnil(L); lua_rawset(L, -3); // set t[key] = nil to remove it ! try_again = true; break; } ! else lua_pop(L, 1); // pop value, lua_next will pop key at end } *************** *** 1639,1643 **** lua_pop(L, 1); // pop table ! return removed; } --- 1639,1643 ---- lua_pop(L, 1); // pop table ! return removed; } *************** *** 1655,1659 **** { // we add "new" copies of the bindings, let the list delete them ! m_bindingList.DeleteContents(true); wxLuaBindingList::compatibility_iterator node = wxLuaBinding::GetBindingList()->GetFirst(); --- 1655,1659 ---- { // we add "new" copies of the bindings, let the list delete them ! m_bindingList.DeleteContents(true); wxLuaBindingList::compatibility_iterator node = wxLuaBinding::GetBindingList()->GetFirst(); *************** *** 1773,1777 **** // Let the Lua garbage collector do it for shutdown. ! // Delete all the wxObject data lua_pushlightuserdata(m_lua_State, &wxlua_lreg_delobjects_key); lua_rawget(m_lua_State, LUA_REGISTRYINDEX); --- 1773,1777 ---- // Let the Lua garbage collector do it for shutdown. ! // Delete all the wxObject data lua_pushlightuserdata(m_lua_State, &wxlua_lreg_delobjects_key); lua_rawget(m_lua_State, LUA_REGISTRYINDEX); *************** *** 2650,2654 **** if (obj && obj->GetClassInfo() && obj->GetClassInfo()->GetClassName()) name = obj->GetClassInfo()->GetClassName(); ! names.Add(wxString::Format(wxT("%s %p"), name.c_str(), obj)); --- 2650,2654 ---- if (obj && obj->GetClassInfo() && obj->GetClassInfo()->GetClassName()) name = obj->GetClassInfo()->GetClassName(); ! names.Add(wxString::Format(wxT("%s %p"), name.c_str(), obj)); Index: wxlbind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlbind.cpp,v retrieving revision 1.100 retrieving revision 1.101 diff -C2 -d -r1.100 -r1.101 *** wxlbind.cpp 7 Dec 2007 02:13:14 -0000 1.100 --- wxlbind.cpp 7 Dec 2007 02:24:56 -0000 1.101 *************** *** 206,210 **** if (ltype != LUA_TUSERDATA) { ! fnCall += lua_typename(L, ltype); } else --- 206,210 ---- if (ltype != LUA_TUSERDATA) { ! fnCall += lua2wx(lua_typename(L, ltype)); } else |