From: John L. <jr...@us...> - 2007-11-17 00:16:52
|
Update of /cvsroot/wxlua/wxLua/bindings In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv13186/wxLua/bindings Modified Files: genwxbind.lua Log Message: Streamlined wxLuaBinding::RegisterBinding(...) and remove the bool "registerClasses" since it didn't do anything useful anyway. If there needs to be a way to reregister the wxLua functions it should to be implemented from the ground up. Renamed the functions wxlua_txxx to wxluaT_xxx to make it easier to search for their usage. The functions in the wxLuaState used to be called just "txxx" and are now called wxluaT_Xxx where the first letter or each word is capitalized (camel-case); again for searching. * This is the beginning of the separation between the "wxLuaReferences" being used for both the "tags" for identifying classes and for just having references to objects so Lua won't GC them. Index: genwxbind.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.lua,v retrieving revision 1.149 retrieving revision 1.150 diff -C2 -d -r1.149 -r1.150 *** genwxbind.lua 8 Nov 2007 00:06:38 -0000 1.149 --- genwxbind.lua 17 Nov 2007 00:14:54 -0000 1.150 *************** *** 18,22 **** -- --------------------------------------------------------------------------- ! WXLUA_BINDING_VERSION = 17 -- 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 = 18 -- Used to verify that the bindings are updated -- This must match modules/wxlua/include/wxldefs.h -- otherwise a compile time error will be generated. *************** *** 3179,3183 **** argItem = "("..argTypeWithAttrib..") wxlState.GetUserDataType("..argNum..", s_wxluatag_"..MakeClassVar(argType)..")" else ! argItem = "("..argTypeWithAttrib..") wxlState.ttouserdata("..argNum..")" end elseif (indirectionCount == 1) and (argPtr == "*") then --- 3179,3183 ---- argItem = "("..argTypeWithAttrib..") wxlState.GetUserDataType("..argNum..", s_wxluatag_"..MakeClassVar(argType)..")" else ! argItem = "("..argTypeWithAttrib..") wxlState.wxlua_ToUserdata("..argNum..")" end elseif (indirectionCount == 1) and (argPtr == "*") then *************** *** 3220,3224 **** else overload_argList = overload_argList.."&s_wxluaarg_LightUserData, " ! argItem = "("..argTypeWithAttrib..")wxlState.ttouserdata("..argNum..")" end --- 3220,3224 ---- else overload_argList = overload_argList.."&s_wxluaarg_LightUserData, " ! argItem = "("..argTypeWithAttrib..")wxlState.wxlua_ToUserdata("..argNum..")" end *************** *** 3242,3246 **** overload_argList = overload_argList.."&s_wxluaarg_LightUserData, " argTypeWithAttrib = argTypeWithAttrib.." *" ! argItem = "("..argTypeWithAttrib..")wxlState.ttouserdata("..argNum..")" end elseif (indirectionCount == 1) and (argPtr == "&") then --- 3242,3246 ---- overload_argList = overload_argList.."&s_wxluaarg_LightUserData, " argTypeWithAttrib = argTypeWithAttrib.." *" ! argItem = "("..argTypeWithAttrib..")wxlState.wxlua_ToUserdata("..argNum..")" end elseif (indirectionCount == 1) and (argPtr == "&") then *************** *** 3266,3270 **** else overload_argList = overload_argList.."&s_wxluaarg_LightUserData, " ! argItem = "("..argTypeWithAttrib..")wxlState.ttouserdata("..argNum..")" end --- 3266,3270 ---- else overload_argList = overload_argList.."&s_wxluaarg_LightUserData, " ! argItem = "("..argTypeWithAttrib..")wxlState.wxlua_ToUserdata("..argNum..")" end *************** *** 4009,4014 **** table.insert(fileData, "\n") table.insert(fileData, "protected:\n") ! table.insert(fileData, " virtual void PreRegister(const wxLuaState& wxlState, bool registerTypes, int luaTable);\n") ! table.insert(fileData, " virtual void PostRegister(const wxLuaState& wxlState, bool registerTypes, int luaTable);\n") table.insert(fileData, "\n") table.insert(fileData, " DECLARE_DYNAMIC_CLASS("..hook_cpp_binding_classname..")\n") --- 4009,4014 ---- table.insert(fileData, "\n") table.insert(fileData, "protected:\n") ! table.insert(fileData, " virtual void PreRegister(const wxLuaState& wxlState, int luaTable);\n") ! table.insert(fileData, " virtual void PostRegister(const wxLuaState& wxlState, int luaTable);\n") table.insert(fileData, "\n") table.insert(fileData, " DECLARE_DYNAMIC_CLASS("..hook_cpp_binding_classname..")\n") *************** *** 4226,4232 **** -- load preregister fn from rules file if wxLuaBinding_PreRegister and string.len(wxLuaBinding_PreRegister) then ! table.insert(fileData, "void "..hook_cpp_binding_classname.."::PreRegister(const wxLuaState& wxlState, bool registerTypes, int luaTable)\n") else ! table.insert(fileData, "void "..hook_cpp_binding_classname.."::PreRegister(const wxLuaState& , bool , int )\n") end table.insert(fileData, "{\n") --- 4226,4232 ---- -- load preregister fn from rules file if wxLuaBinding_PreRegister and string.len(wxLuaBinding_PreRegister) then ! table.insert(fileData, "void "..hook_cpp_binding_classname.."::PreRegister(const wxLuaState& wxlState, int luaTable)\n") else ! table.insert(fileData, "void "..hook_cpp_binding_classname.."::PreRegister(const wxLuaState& , int )\n") end table.insert(fileData, "{\n") *************** *** 4235,4241 **** -- load postregister fn from rules file if wxLuaBinding_PostRegister and string.len(wxLuaBinding_PostRegister) then ! table.insert(fileData, "void "..hook_cpp_binding_classname.."::PostRegister(const wxLuaState& wxlState, bool registerTypes, int luaTable)\n") else ! table.insert(fileData, "void "..hook_cpp_binding_classname.."::PostRegister(const wxLuaState& , bool , int )\n") end table.insert(fileData, "{\n") --- 4235,4241 ---- -- load postregister fn from rules file if wxLuaBinding_PostRegister and string.len(wxLuaBinding_PostRegister) then ! table.insert(fileData, "void "..hook_cpp_binding_classname.."::PostRegister(const wxLuaState& wxlState, int luaTable)\n") else ! table.insert(fileData, "void "..hook_cpp_binding_classname.."::PostRegister(const wxLuaState&, int )\n") end table.insert(fileData, "{\n") |