From: John L. <jr...@us...> - 2007-03-19 03:47:28
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv6284/wxLua/modules/wxlua/src Modified Files: wxlbind.cpp wxlcallb.cpp wxlstate.cpp Log Message: use wxList::compatibility_iterator not wxNode* for wxUSE_STL == 1 and 0 Index: wxlstate.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v retrieving revision 1.90 retrieving revision 1.91 diff -C2 -d -r1.90 -r1.91 *** wxlstate.cpp 16 Mar 2007 21:23:47 -0000 1.90 --- wxlstate.cpp 19 Mar 2007 03:47:21 -0000 1.91 *************** *** 733,737 **** // It wasn't, so check all its children ! for ( wxWindowList::Node * node = parent->GetChildren().GetFirst(); node; node = node->GetNext() ) --- 733,737 ---- // It wasn't, so check all its children ! for ( wxWindowList::compatibility_iterator node = parent->GetChildren().GetFirst(); node; node = node->GetNext() ) *************** *** 760,764 **** } // start at very top of wx's windows ! for ( wxWindowList::Node * top_node = wxTopLevelWindows.GetFirst(); top_node; top_node = top_node->GetNext() ) --- 760,764 ---- } // start at very top of wx's windows ! for ( wxWindowList::compatibility_iterator top_node = wxTopLevelWindows.GetFirst(); top_node; top_node = top_node->GetNext() ) *************** *** 775,779 **** // ---------------------------------------------------------------------------- ! // wxLuaCleanupWindows - given a wxList of wxWindows it runs wxFindWindowByPointer // on it to remove dead pointers from the list if only_check=true or // Destroy() the windows and remove them from the list if !only_check. --- 775,779 ---- // ---------------------------------------------------------------------------- ! // wxLuaCleanupWindows - given a wxWindowList of wxWindows it runs wxFindWindowByPointer // on it to remove dead pointers from the list if only_check=true or // Destroy() the windows and remove them from the list if !only_check. *************** *** 781,789 **** // returns true if any windows removed, ie. the list has changed // ---------------------------------------------------------------------------- ! bool wxLuaCleanupWindows(wxList *list, bool only_check) { bool removed = false; ! wxNode *node = list->GetFirst(); while (node != NULL) --- 781,789 ---- // returns true if any windows removed, ie. the list has changed // ---------------------------------------------------------------------------- ! bool wxLuaCleanupWindows(wxWindowList *list, bool only_check) { bool removed = false; ! wxWindowList::compatibility_iterator node = list->GetFirst(); while (node != NULL) *************** *** 793,797 **** if (!win) { ! wxNode *lastNode = node; node = node->GetNext(); list->DeleteNode(lastNode); --- 793,797 ---- if (!win) { ! wxWindowList::compatibility_iterator lastNode = node; node = node->GetNext(); list->DeleteNode(lastNode); *************** *** 800,804 **** { removed = true; ! wxNode *lastNode = node; node = node->GetNext(); //printf("%d %d\n", int(lastNode), int(node)); fflush(stdout); --- 800,804 ---- { removed = true; ! wxWindowList::compatibility_iterator lastNode = node; node = node->GetNext(); //printf("%d %d\n", int(lastNode), int(node)); fflush(stdout); *************** *** 877,881 **** m_bindingList.DeleteContents(true); // we add "new" copies of the bindings ! wxLuaBindingList::Node *node = wxLuaBinding::GetBindingList()->GetFirst(); for (; node; node = node->GetNext() ) { --- 877,881 ---- m_bindingList.DeleteContents(true); // we add "new" copies of the bindings ! wxLuaBindingList::compatibility_iterator node = wxLuaBinding::GetBindingList()->GetFirst(); for (; node; node = node->GetNext() ) { *************** *** 906,913 **** m_trackedObjects.clear(); ! wxLuaBindingList::Node *node = m_bindingList.GetFirst(); while (node) { ! wxLuaBindingList::Node* next_node = node->GetNext(); m_bindingList.DeleteNode(node); // see m_bindingList.DeleteContents(true) node = next_node; --- 906,913 ---- m_trackedObjects.clear(); ! wxLuaBindingList::compatibility_iterator node = m_bindingList.GetFirst(); while (node) { ! wxLuaBindingList::compatibility_iterator next_node = node->GetNext(); m_bindingList.DeleteNode(node); // see m_bindingList.DeleteContents(true) node = next_node; *************** *** 1016,1020 **** { // remove any and all callbacks that use this event handler since its gone ! wxNode* node = m_wxlStateData->m_callbackList.GetFirst(); while (node) { --- 1016,1020 ---- { // remove any and all callbacks that use this event handler since its gone ! wxList::compatibility_iterator node = m_wxlStateData->m_callbackList.GetFirst(); while (node) { *************** *** 1047,1051 **** // UnRegister bindings ! wxLuaBindingList::Node *node; for (node = m_wxlStateData->m_bindingList.GetFirst(); node; node = node->GetNext() ) { --- 1047,1051 ---- // UnRegister bindings ! wxLuaBindingList::compatibility_iterator node; for (node = m_wxlStateData->m_bindingList.GetFirst(); node; node = node->GetNext() ) { *************** *** 1663,1667 **** // Register bindings ! wxLuaBindingList::Node *node; for (node = M_WXLSTATEDATA->m_wxlStateData->m_bindingList.GetFirst(); node; node = node->GetNext() ) { --- 1663,1667 ---- // Register bindings ! wxLuaBindingList::compatibility_iterator node; for (node = M_WXLSTATEDATA->m_wxlStateData->m_bindingList.GetFirst(); node; node = node->GetNext() ) { *************** *** 1688,1692 **** if (pLuaClass->baseclassName) { ! wxLuaBindingList::Node* basenode; for (basenode = M_WXLSTATEDATA->m_wxlStateData->m_bindingList.GetFirst(); basenode; basenode = basenode->GetNext() ) { --- 1688,1692 ---- if (pLuaClass->baseclassName) { ! wxLuaBindingList::compatibility_iterator basenode; for (basenode = M_WXLSTATEDATA->m_wxlStateData->m_bindingList.GetFirst(); basenode; basenode = basenode->GetNext() ) { *************** *** 1715,1719 **** { wxCHECK_MSG(GetRefData() != NULL, NULL, wxT("Invalid wxLuaState")); ! wxLuaBindingList::Node *node; for (node = M_WXLSTATEDATA->m_wxlStateData->m_bindingList.GetFirst(); node; node = node->GetNext() ) { --- 1715,1719 ---- { wxCHECK_MSG(GetRefData() != NULL, NULL, wxT("Invalid wxLuaState")); ! wxLuaBindingList::compatibility_iterator node; for (node = M_WXLSTATEDATA->m_wxlStateData->m_bindingList.GetFirst(); node; node = node->GetNext() ) { *************** *** 1732,1736 **** classItem.class_tag = &iClassTag; ! wxLuaBindingList::Node *node; for (node = M_WXLSTATEDATA->m_wxlStateData->m_bindingList.GetFirst(); node; node = node->GetNext() ) { --- 1732,1736 ---- classItem.class_tag = &iClassTag; ! wxLuaBindingList::compatibility_iterator node; for (node = M_WXLSTATEDATA->m_wxlStateData->m_bindingList.GetFirst(); node; node = node->GetNext() ) { *************** *** 1754,1758 **** { wxCHECK_MSG(GetRefData() != NULL, NULL, wxT("Invalid wxLuaState")); ! wxLuaBindingList::Node *node; for (node = M_WXLSTATEDATA->m_wxlStateData->m_bindingList.GetFirst(); node; node = node->GetNext() ) { --- 1754,1759 ---- { wxCHECK_MSG(GetRefData() != NULL, NULL, wxT("Invalid wxLuaState")); ! ! wxLuaBindingList::compatibility_iterator node; for (node = M_WXLSTATEDATA->m_wxlStateData->m_bindingList.GetFirst(); node; node = node->GetNext() ) { *************** *** 1800,1804 **** wxCHECK_MSG(Ok(), NULL, wxT("Invalid wxLuaState")); ! wxLuaBindingList::Node *node; for (node = M_WXLSTATEDATA->m_wxlStateData->m_bindingList.GetFirst(); node; node = node->GetNext()) { --- 1801,1805 ---- wxCHECK_MSG(Ok(), NULL, wxT("Invalid wxLuaState")); ! wxLuaBindingList::compatibility_iterator node; for (node = M_WXLSTATEDATA->m_wxlStateData->m_bindingList.GetFirst(); node; node = node->GetNext()) { *************** *** 1967,1971 **** wxWindow* parent = win; ! wxList* list = &M_WXLSTATEDATA->m_wxlStateData->m_windowList; while (parent) --- 1968,1972 ---- wxWindow* parent = win; ! wxWindowList* list = &M_WXLSTATEDATA->m_wxlStateData->m_windowList; while (parent) *************** *** 2282,2286 **** // check to make sure that we're not trying to attach another destroy callback bool already_handled = false; ! wxNode* node = M_WXLSTATEDATA->m_wxlStateData->m_winDestroyCallbackList.GetFirst(); while (node) { --- 2283,2287 ---- // check to make sure that we're not trying to attach another destroy callback bool already_handled = false; ! wxList::compatibility_iterator node = M_WXLSTATEDATA->m_wxlStateData->m_winDestroyCallbackList.GetFirst(); while (node) { Index: wxlbind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlbind.cpp,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** wxlbind.cpp 16 Mar 2007 21:23:47 -0000 1.54 --- wxlbind.cpp 19 Mar 2007 03:47:21 -0000 1.55 *************** *** 553,557 **** // find the m_wxLuaTable of the previously loaded binding (start at last) ! wxLuaBindingList::Node *node = wxlState.GetLuaBindingList()->GetFirst(); for (; node; node = node->GetNext()) { --- 553,557 ---- // find the m_wxLuaTable of the previously loaded binding (start at last) ! wxLuaBindingList::compatibility_iterator node = wxlState.GetLuaBindingList()->GetFirst(); for (; node; node = node->GetNext()) { Index: wxlcallb.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlcallb.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** wxlcallb.cpp 16 Mar 2007 21:23:47 -0000 1.26 --- wxlcallb.cpp 19 Mar 2007 03:47:21 -0000 1.27 *************** *** 80,84 **** wxEvtHandler *evtHandler = ((wxWindow*)event.GetEventObject())->GetEventHandler(); ! wxNode* node = wxlState.GetTrackedCallbackList()->GetFirst(); while (node) { --- 80,84 ---- wxEvtHandler *evtHandler = ((wxWindow*)event.GetEventObject())->GetEventHandler(); ! wxList::compatibility_iterator node = wxlState.GetTrackedCallbackList()->GetFirst(); while (node) { *************** *** 88,92 **** { // delete the reference to all other handlers that are cleared ! wxNode* pc_node = node; // remember current node node = node->GetNext(); wxlState.GetTrackedCallbackList()->Erase(pc_node); --- 88,92 ---- { // delete the reference to all other handlers that are cleared ! wxList::compatibility_iterator pc_node = node; // remember current node node = node->GetNext(); wxlState.GetTrackedCallbackList()->Erase(pc_node); |