From: John L. <jr...@us...> - 2006-12-14 01:01:33
|
Update of /cvsroot/wxlua/wxLua/modules/wxbindstc/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1560/wxLua/modules/wxbindstc/src Modified Files: stc.cpp wxstc_bind.cpp Log Message: speed up genwxbind.lua add wxLuaBinding::GetBindingName as a unique name to know if it's added Rename *AddToTrackedMemory -> AddTrackedObject since it only tracks wxObjects Rename wxLuaState::AddTrackedEventHandler to AddTrackedCallback and only accept wxLuaCallbacks Rename wxLuaState::AddTrackedDestroyEventHandler to AddTrackedWinDestroyCallback and only accept wxLuaWinDestroyCallbacks Make type evaluation for the bindings more strict Index: wxstc_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbindstc/src/wxstc_bind.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** wxstc_bind.cpp 12 Dec 2006 07:09:41 -0000 1.15 --- wxstc_bind.cpp 14 Dec 2006 01:01:26 -0000 1.16 *************** *** 1475,1479 **** wxLuaBinding_wxstc::wxLuaBinding_wxstc() : wxLuaBinding() { ! m_nameSpace = wxT("wx"); m_classList = wxLuaGetClassList_wxstc(m_classCount); m_defineList = wxLuaGetDefineList_wxstc(m_defineCount); --- 1475,1480 ---- wxLuaBinding_wxstc::wxLuaBinding_wxstc() : wxLuaBinding() { ! m_bindingName = wxT("wxstc"); ! m_nameSpace = wxT("wx"); m_classList = wxLuaGetClassList_wxstc(m_classCount); m_defineList = wxLuaGetDefineList_wxstc(m_defineCount); Index: stc.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbindstc/src/stc.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** stc.cpp 12 Dec 2006 07:09:41 -0000 1.18 --- stc.cpp 14 Dec 2006 01:01:26 -0000 1.19 *************** *** 40,44 **** returns = new wxColour(self->GetCaretLineBackground()); // add the new object to the tracked memory list ! wxLua_AddToTrackedMemoryList(wxlState, (wxColour *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxColour, returns); --- 40,44 ---- returns = new wxColour(self->GetCaretLineBackground()); // add the new object to the tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxColour *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxColour, returns); *************** *** 76,80 **** returns = new wxColour(self->GetCaretLineBack()); // add the new object to the tracked memory list ! wxLua_AddToTrackedMemoryList(wxlState, (wxColour *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxColour, returns); --- 76,80 ---- returns = new wxColour(self->GetCaretLineBack()); // add the new object to the tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxColour *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxColour, returns); *************** *** 6214,6218 **** returns = new wxColour(self->IndicatorGetForeground(indic)); // add the new object to the tracked memory list ! wxLua_AddToTrackedMemoryList(wxlState, (wxColour *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxColour, returns); --- 6214,6218 ---- returns = new wxColour(self->IndicatorGetForeground(indic)); // add the new object to the tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxColour *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxColour, returns); *************** *** 6264,6268 **** returns = new wxColour(self->GetCaretForeground()); // add the new object to the tracked memory list ! wxLua_AddToTrackedMemoryList(wxlState, (wxColour *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxColour, returns); --- 6264,6268 ---- returns = new wxColour(self->GetCaretForeground()); // add the new object to the tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxColour *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxColour, returns); *************** *** 6356,6360 **** returns = new wxColour(self->GetEdgeColour()); // add the new object to the tracked memory list ! wxLua_AddToTrackedMemoryList(wxlState, (wxColour *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxColour, returns); --- 6356,6360 ---- returns = new wxColour(self->GetEdgeColour()); // add the new object to the tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxColour *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxColour, returns); *************** *** 6500,6504 **** // add to tracked window list if (returns && returns->IsKindOf(CLASSINFO(wxWindow))) ! wxlState.AddToTrackedWindowList((wxWindow*)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxStyledTextCtrl, returns); --- 6500,6504 ---- // add to tracked window list if (returns && returns->IsKindOf(CLASSINFO(wxWindow))) ! wxlState.AddTrackedWindow((wxWindow*)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxStyledTextCtrl, returns); *************** *** 6537,6541 **** returns = new wxPoint(self->PointFromPosition(pos)); // add the new object to the tracked memory list ! wxLua_AddToTrackedMemoryList(wxlState, (wxPoint *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxPoint, returns); --- 6537,6541 ---- returns = new wxPoint(self->PointFromPosition(pos)); // add the new object to the tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxPoint *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxPoint, returns); *************** *** 7201,7205 **** returns = new wxStyledTextEvent(commandType, id); // add to tracked memory list ! wxLua_AddToTrackedMemoryList(wxlState, (wxStyledTextEvent *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxStyledTextEvent, returns); --- 7201,7205 ---- returns = new wxStyledTextEvent(commandType, id); // add to tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxStyledTextEvent *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxStyledTextEvent, returns); *************** *** 7811,7815 **** // remove from tracked memory list if (self != 0) ! wxlState.RemoveTrackedMemory(self); return 0; } --- 7811,7815 ---- // remove from tracked memory list if (self != 0) ! wxlState.RemoveTrackedObject(self); return 0; } *************** *** 7821,7825 **** // remove from tracked memory list if (self != 0) ! if (wxlState.RemoveTrackedMemory(self)) { // if removed, reset the tag so that gc() is not called on this object. lua_pushnil(L); --- 7821,7825 ---- // remove from tracked memory list if (self != 0) ! if (wxlState.RemoveTrackedObject(self)) { // if removed, reset the tag so that gc() is not called on this object. lua_pushnil(L); |