Update of /cvsroot/wxlua/wxLua/modules/wxlua/src
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv2271/wxLua/modules/wxlua/src
Modified Files:
wxlbind.cpp wxlstate.cpp wxlua.cpp
Log Message:
Add ored enum DELETE_CLEAR_OBJECT for wxLuaState::RemoveTrackedObject to simplify
Apply patch to lparser.c "Too many variables in an assignment may cause a C stack overflow"
Index: wxlua.cpp
===================================================================
RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlua.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** wxlua.cpp 22 Jul 2007 04:38:30 -0000 1.3
--- wxlua.cpp 1 Aug 2007 19:15:38 -0000 1.4
***************
*** 41,45 ****
wxLuaState * self = (wxLuaState *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaState);
// if removed from tracked mem list, reset the tag so that gc() is not called on this object.
! if ((self != NULL) && wxlState.RemoveTrackedObject(self, wxLuaState::DELETE_OBJECT|wxLuaState::CLEAR_LUA_TRACKED|wxLuaState::CLEAR_DERIVED_METHODS))
{
lua_pushnil(L);
--- 41,45 ----
wxLuaState * self = (wxLuaState *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaState);
// if removed from tracked mem list, reset the tag so that gc() is not called on this object.
! if ((self != NULL) && wxlState.RemoveTrackedObject(self, wxLuaState::DELETE_CLEAR_OBJECT))
{
lua_pushnil(L);
***************
*** 128,132 ****
wxLuaObject * self = (wxLuaObject *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaObject);
// if removed from tracked mem list, reset the tag so that gc() is not called on this object.
! if ((self != NULL) && wxlState.RemoveTrackedObject(self, wxLuaState::DELETE_OBJECT|wxLuaState::CLEAR_LUA_TRACKED|wxLuaState::CLEAR_DERIVED_METHODS))
{
lua_pushnil(L);
--- 128,132 ----
wxLuaObject * self = (wxLuaObject *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaObject);
// if removed from tracked mem list, reset the tag so that gc() is not called on this object.
! if ((self != NULL) && wxlState.RemoveTrackedObject(self, wxLuaState::DELETE_CLEAR_OBJECT))
{
lua_pushnil(L);
Index: wxlstate.cpp
===================================================================
RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v
retrieving revision 1.125
retrieving revision 1.126
diff -C2 -d -r1.125 -r1.126
*** wxlstate.cpp 1 Aug 2007 03:21:24 -0000 1.125
--- wxlstate.cpp 1 Aug 2007 19:15:38 -0000 1.126
***************
*** 2255,2259 ****
// Nor are we tracking it within the Lua reg table
! if (WXLUA_HASBIT(flags, CLEAR_LUA_TRACKED))
wxlua_tuntrackuserdata(L, pObject);
--- 2255,2259 ----
// Nor are we tracking it within the Lua reg table
! if (WXLUA_HASBIT(flags, CLEAR_TRACKED_OBJECT))
wxlua_tuntrackuserdata(L, pObject);
***************
*** 2274,2279 ****
M_WXLSTATEDATA->m_wxlStateData->m_trackedObjects.erase(it);
- //wxPrintf(wxT("RemoveTRACKED %ld %d\n"), long(pObject), int(fDelete));
-
return true;
}
--- 2274,2277 ----
Index: wxlbind.cpp
===================================================================
RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlbind.cpp,v
retrieving revision 1.89
retrieving revision 1.90
diff -C2 -d -r1.89 -r1.90
*** wxlbind.cpp 1 Aug 2007 03:21:24 -0000 1.89
--- wxlbind.cpp 1 Aug 2007 19:15:37 -0000 1.90
***************
*** 254,258 ****
// clean up the rest of this, this won't error if the key doesn't exist
! wxlState.RemoveTrackedObject(key, wxLuaState::DELETE_OBJECT|wxLuaState::CLEAR_LUA_TRACKED|wxLuaState::CLEAR_DERIVED_METHODS);
}
--- 254,258 ----
// clean up the rest of this, this won't error if the key doesn't exist
! wxlState.RemoveTrackedObject(key, wxLuaState::DELETE_CLEAR_OBJECT);
}
|