From: John L. <jr...@us...> - 2006-05-24 04:50:12
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv4440/wxLua/modules/wxlua/src Modified Files: wxlbind.cpp Log Message: move the wxLuaDebugSocket bindings to their own dir and out of wxWidgets bindings fix using more than two bindings with same namespace Index: wxlbind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlbind.cpp,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** wxlbind.cpp 18 May 2006 05:47:40 -0000 1.34 --- wxlbind.cpp 24 May 2006 04:50:02 -0000 1.35 *************** *** 279,283 **** m_startTag(0), m_lastTag(0), ! m_wxLuaTable(0) { } --- 279,283 ---- m_startTag(0), m_lastTag(0), ! m_wxLuaTable(-1) { } *************** *** 357,373 **** tableOffset = lua_gettop(L); ! // find the m_wxLuaTable of the previously loaded binding ! wxLuaBindingList::Node *node; ! for (node = wxLuaBinding::GetBindingList()->GetFirst(); node; node = node->GetNext() ) { wxLuaBinding* binding = node->GetData(); - wxCHECK_MSG(binding != this, 0, wxT("Invalid binding order?")); ! if (binding->GetLuaNamespace() == m_nameSpace) { ! m_wxLuaTable = binding->m_wxLuaTable; ! break; } } } --- 357,377 ---- tableOffset = lua_gettop(L); ! // remember the last good binding with the same namespace ! wxLuaBinding* namedBinding = NULL; ! ! // find the m_wxLuaTable of the previously loaded binding (start at last) ! wxLuaBindingList::Node *node = wxlState.GetLuaBindingList()->GetFirst(); ! for (; node; node = node->GetNext()) { wxLuaBinding* binding = node->GetData(); ! if ((binding->GetLuaNamespace() == m_nameSpace) && (binding->m_wxLuaTable >= 0)) { ! namedBinding = binding; } } + + if (namedBinding) + m_wxLuaTable = namedBinding->m_wxLuaTable; } |