From: John L. <jr...@us...> - 2006-12-12 07:10:12
|
Update of /cvsroot/wxlua/wxLua/bindings In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv18786/wxLua/bindings Modified Files: genwxbind.lua Log Message: lots of little cleanups Add wx.NULL to replace wx.wxNull (which still exists) to be more C like Don't have static WXLUAMETHODs and then en extern pointer to them, just don't have them static More variable/function name changes to make the code more readable Index: genwxbind.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.lua,v retrieving revision 1.86 retrieving revision 1.87 diff -C2 -d -r1.86 -r1.87 *** genwxbind.lua 7 Dec 2006 06:32:41 -0000 1.86 --- genwxbind.lua 12 Dec 2006 07:09:38 -0000 1.87 *************** *** 3865,3869 **** { ExternDeclaration = "extern "..MakeImpExpData("int").." s_wxluatag_"..MakeClassVar(parseObject.Name)..";\n", ! ExternMethodDeclaration = "extern "..output_cpp_impexpsymbol.." WXLUAMETHOD* "..MakeVar(parseObject.Name).."_methods;\n", ExternMethodCountDeclaration = "extern "..MakeImpExpData("int").." "..MakeVar(parseObject.Name).."_methodCount;\n", Condition = tagcondition --- 3865,3869 ---- { ExternDeclaration = "extern "..MakeImpExpData("int").." s_wxluatag_"..MakeClassVar(parseObject.Name)..";\n", ! ExternMethodDeclaration = "extern "..output_cpp_impexpsymbol.." WXLUAMETHOD "..MakeVar(parseObject.Name).."_methods[];\n", ExternMethodCountDeclaration = "extern "..MakeImpExpData("int").." "..MakeVar(parseObject.Name).."_methodCount;\n", Condition = tagcondition *************** *** 4313,4317 **** table.insert(fileData, " wxCHECK_MSG(wxlState.Ok(), false, wxT(\"Invalid wxLuaState\"));\n") table.insert(fileData, "\n") ! table.insert(fileData, " wxASSERT(!wxlState.GetLuaStateData()->m_typesRegistered);\n") table.insert(fileData, " wxASSERT(!wxlState.GetLuaBinding(wxT(\""..hook_cpp_namespace.."\")));\n") table.insert(fileData, "\n") --- 4313,4317 ---- table.insert(fileData, " wxCHECK_MSG(wxlState.Ok(), false, wxT(\"Invalid wxLuaState\"));\n") table.insert(fileData, "\n") ! table.insert(fileData, " wxASSERT(!wxlState.GetLuaStateData()->m_bindings_registered);\n") table.insert(fileData, " wxASSERT(!wxlState.GetLuaBinding(wxT(\""..hook_cpp_namespace.."\")));\n") table.insert(fileData, "\n") *************** *** 4320,4324 **** table.insert(fileData, " return false;\n") table.insert(fileData, "\n") ! table.insert(fileData, " wxlState.GetLuaStateData()->m_bindings.Append(new "..hook_cpp_binding_classname.."());\n") table.insert(fileData, "\n") table.insert(fileData, " return true;\n") --- 4320,4324 ---- table.insert(fileData, " return false;\n") table.insert(fileData, "\n") ! table.insert(fileData, " wxlState.GetLuaStateData()->m_bindingList.Append(new "..hook_cpp_binding_classname.."());\n") table.insert(fileData, "\n") table.insert(fileData, " return true;\n") *************** *** 4796,4800 **** end ! table.insert(fileData, "static WXLUAMETHOD s_"..MakeClassVar(ObjectName).."_methods[] = {\n") for condition, BindTableList in pairs_sort(BindTable) do --- 4796,4800 ---- end ! table.insert(fileData, "WXLUAMETHOD "..MakeClassVar(ObjectName).."_methods[] = {\n") for condition, BindTableList in pairs_sort(BindTable) do *************** *** 4819,4828 **** table.insert(fileData, "};\n\n") ! if comment_cpp_binding_code then ! table.insert(fileData, "// Extern accessor to class method map\n") ! end ! ! table.insert(fileData, "WXLUAMETHOD* "..MakeVar(ObjectName).."_methods = s_"..MakeClassVar(ObjectName).."_methods;\n") ! table.insert(fileData, "int "..MakeVar(ObjectName).."_methodCount = sizeof(s_"..MakeClassVar(ObjectName).."_methods)/sizeof(s_"..MakeClassVar(ObjectName).."_methods[0]);\n") if object.Condition then --- 4819,4824 ---- table.insert(fileData, "};\n\n") ! -- since there may be conditions count them up afterwards ! table.insert(fileData, "int "..MakeVar(ObjectName).."_methodCount = sizeof("..MakeClassVar(ObjectName).."_methods)/sizeof("..MakeClassVar(ObjectName).."_methods[0]);\n") if object.Condition then |