Update of /cvsroot/wxlua/wxLua/bindings
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv12109/wxLua/bindings
Modified Files:
genwxbind.lua
Log Message:
Add parameter to wxLuaState::RemoveTrackedObject to select how we untrack it
Fixes removing derived methods for the %ungc binding tag
Index: genwxbind.lua
===================================================================
RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.lua,v
retrieving revision 1.144
retrieving revision 1.145
diff -C2 -d -r1.144 -r1.145
*** genwxbind.lua 16 Jul 2007 19:34:13 -0000 1.144
--- genwxbind.lua 22 Jul 2007 04:38:27 -0000 1.145
***************
*** 18,22 ****
-- ---------------------------------------------------------------------------
! WXLUA_BINDING_VERSION = 15 -- Used to verify that the bindings are updated
-- This must match modules/wxlua/include/wxldefs.h
-- otherwise a compile time error will be generated.
--- 18,22 ----
-- ---------------------------------------------------------------------------
! WXLUA_BINDING_VERSION = 16 -- Used to verify that the bindings are updated
-- This must match modules/wxlua/include/wxldefs.h
-- otherwise a compile time error will be generated.
***************
*** 3246,3250 ****
end
elseif param.UnGC then
! table.insert(gcList, " if (wxlState.IsTrackedObject("..argName..")) wxlState.RemoveTrackedObject("..argName..", false);\n")
end
--- 3246,3250 ----
end
elseif param.UnGC then
! table.insert(gcList, " if (wxlState.IsTrackedObject("..argName..")) wxlState.RemoveTrackedObject("..argName..", wxLuaState::UNDELETE);\n")
end
***************
*** 3585,3589 ****
if parseObject.UnGCThis then
! table.insert(codeList, " wxlState.RemoveTrackedObject(self, false);\n")
elseif parseObject.GCThis then
if parseObject.Encapsulate then
--- 3585,3589 ----
if parseObject.UnGCThis then
! table.insert(codeList, " wxlState.RemoveTrackedObject(self, wxLuaState::UNDELETE);\n")
elseif parseObject.GCThis then
if parseObject.Encapsulate then
***************
*** 3665,3669 ****
end
elseif member.UnGC then
! table.insert(codeList, " if (wxlState.IsTrackedObject(returns)) wxlState.RemoveTrackedObject(returns, false);\n")
end
--- 3665,3669 ----
end
elseif member.UnGC then
! table.insert(codeList, " if (wxlState.IsTrackedObject(returns)) wxlState.RemoveTrackedObject(returns, wxLuaState::UNDELETE);\n")
end
***************
*** 3836,3840 ****
table.insert(codeList, " "..parseObject.Name.." * self = ("..parseObject.Name.." *)wxlState.GetUserDataType(1, s_wxluatag_"..MakeClassVar(parseObject.Name)..");\n")
CommentBindingTable(codeList, " // if removed from tracked mem list, reset the tag so that gc() is not called on this object.\n")
! table.insert(codeList, " if ((self != NULL) && wxlState.RemoveTrackedObject(self))\n")
table.insert(codeList, " {\n")
table.insert(codeList, " lua_pushnil(L);\n")
--- 3836,3840 ----
table.insert(codeList, " "..parseObject.Name.." * self = ("..parseObject.Name.." *)wxlState.GetUserDataType(1, s_wxluatag_"..MakeClassVar(parseObject.Name)..");\n")
CommentBindingTable(codeList, " // if removed from tracked mem list, reset the tag so that gc() is not called on this object.\n")
! table.insert(codeList, " if ((self != NULL) && wxlState.RemoveTrackedObject(self, wxLuaState::DELETE_OBJECT|wxLuaState::CLEAR_LUA_TRACKED|wxLuaState::CLEAR_DERIVED_METHODS))\n")
table.insert(codeList, " {\n")
table.insert(codeList, " lua_pushnil(L);\n")
|