From: John L. <jr...@us...> - 2006-11-30 05:56:35
|
Update of /cvsroot/wxlua/wxLua/bindings In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv6079/wxLua/bindings Modified Files: genwxbind.lua Log Message: fix wxBitmapFromFile constructor some cleanup to genwxbind Index: genwxbind.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.lua,v retrieving revision 1.82 retrieving revision 1.83 diff -C2 -d -r1.82 -r1.83 *** genwxbind.lua 29 Nov 2006 23:37:07 -0000 1.82 --- genwxbind.lua 30 Nov 2006 05:56:30 -0000 1.83 *************** *** 108,114 **** -- atable is the input table to dump the contents of -- prefix is a string prefix for debugging purposes ! -- tablelevel is tracker for recursive calls to DumpTable (do not use initially) -- --------------------------------------------------------------------------- ! function DumpTable(atable, prefix, tablelevel) if prefix == nil then prefix = "" end if tablelevel == nil then tablelevel = "" end --- 108,114 ---- -- atable is the input table to dump the contents of -- prefix is a string prefix for debugging purposes ! -- tablelevel is tracker for recursive calls to TableDump (do not use initially) -- --------------------------------------------------------------------------- ! function TableDump(atable, prefix, tablelevel) if prefix == nil then prefix = "" end if tablelevel == nil then tablelevel = "" end *************** *** 122,126 **** print(prefix..n, tablelevel.."["..k.."]", v) if type(v) == "table" then ! DumpTable(v, prefix.." ", tablelevel.."["..k.."]") end end --- 122,126 ---- print(prefix..n, tablelevel.."["..k.."]", v) if type(v) == "table" then ! TableDump(v, prefix.." ", tablelevel.."["..k.."]") end end *************** *** 531,535 **** -- --------------------------------------------------------------------------- ! -- Do the contents of the file matche the strings in the fileData table? -- the table may contain any number of \n per index -- returns true for a match or false if not --- 531,535 ---- -- --------------------------------------------------------------------------- ! -- Do the contents of the file match the strings in the fileData table? -- the table may contain any number of \n per index -- returns true for a match or false if not *************** *** 612,618 **** result = string.format("wxCHECK_VERSION(%d,%d,%d)", ver[1], ver[2], ver[3]) conditions[condition] = result -- cache result ! elseif string.find(condition, "wxLUA_USE_", 1, 1) == 1 then print("Warning unknown wxLUA_USE_XXX tag, maybe a missing condition? '"..condition.."'") ! elseif string.find(condition, "wxUSE_", 1, 1) == 1 then print("Warning unknown wxUSE_XXX tag, maybe a missing condition? '"..condition.."'") end --- 612,618 ---- result = string.format("wxCHECK_VERSION(%d,%d,%d)", ver[1], ver[2], ver[3]) conditions[condition] = result -- cache result ! elseif string.find(condition, "wxLUA_USE_", 1, 1) then print("Warning unknown wxLUA_USE_XXX tag, maybe a missing condition? '"..condition.."'") ! elseif string.find(condition, "wxUSE_", 1, 1) then print("Warning unknown wxUSE_XXX tag, maybe a missing condition? '"..condition.."'") end *************** *** 644,648 **** -- --------------------------------------------------------------------------- ! -- add conditions by && them, either may be nil -- --------------------------------------------------------------------------- function AddCondition(condition1, condition2) --- 644,648 ---- -- --------------------------------------------------------------------------- ! -- add conditions with &&, either input condition may be nil -- --------------------------------------------------------------------------- function AddCondition(condition1, condition2) *************** *** 1745,1749 **** if table.getn(parseState.ObjectStack) == 0 then ! print("Error: parseState.ObjectStack is unexpectedly empty. "..LineTableErrString(lineTable)) end --- 1745,1749 ---- if table.getn(parseState.ObjectStack) == 0 then ! print("Error: parseState.ObjectStack is unexpectedly empty on %endclass. "..LineTableErrString(lineTable)) end *************** *** 1784,1788 **** if table.getn(parseState.ObjectStack) == 0 then ! print("Error: parseState.ObjectStack is unexpectedly empty. "..LineTableErrString(lineTable)) end break -- we can stop processing line --- 1784,1788 ---- if table.getn(parseState.ObjectStack) == 0 then ! print("Error: parseState.ObjectStack is unexpectedly empty on %endstruct. "..LineTableErrString(lineTable)) end break -- we can stop processing line *************** *** 1808,1812 **** if table.getn(parseState.ObjectStack) == 0 then ! print("Error: parseState.ObjectStack is unexpectedly empty. "..LineTableErrString(lineTable)) end break -- we can stop processing line --- 1808,1812 ---- if table.getn(parseState.ObjectStack) == 0 then ! print("Error: parseState.ObjectStack is unexpectedly empty on %endenum. "..LineTableErrString(lineTable)) end break -- we can stop processing line *************** *** 1924,1932 **** lineState.DefType = "define_pointer" ! end end elseif not parseState.IsBlockComment then ! if (tag == "!") or ((lineState.DefType == "blockcondition") or lineState.InLineConditionIf) and conditionOperators[tag] then if not lineState.Condition and (conditionOperators[tag] ~= "!") then print("Error: Unexpected Conditional Operator "..tag..". "..LineTableErrString(lineTable)) --- 1924,1937 ---- lineState.DefType = "define_pointer" ! else ! print("Warning : Unhandled keyword '"..tag.."' in "..LineTableErrString(lineTable)) end end + -- --------------------------------------------------------------- + -- else !keyword[tag] + -- --------------------------------------------------------------- elseif not parseState.IsBlockComment then ! -- handle condition operators, note can have leading ! for not ! if (tag == "!") or (((lineState.DefType == "blockcondition") or lineState.InLineConditionIf) and conditionOperators[tag]) then if not lineState.Condition and (conditionOperators[tag] ~= "!") then print("Error: Unexpected Conditional Operator "..tag..". "..LineTableErrString(lineTable)) *************** *** 1971,1980 **** end - -- just ignore c++ operator FIXME remove this - --if tag == "operator" then - -- lineState.Skip = true - -- break - --end - -- add block condition if lineState.DefType == "blockcondition" then --- 1976,1979 ---- *************** *** 2068,2076 **** else ! print("Error: Expected DataType, got "..tag..". "..LineTableErrString(lineTable)) end end else ! print("Error: Unexpected parseObject "..parseState.ObjectStack[1].DefType.." "..parseState.ObjectStack[1].Name..". "..LineTableErrString(lineTable)) end elseif lineState.Action == "classname" then --- 2067,2075 ---- else ! print("Error: Expected DataType, got '"..tag.."'. "..LineTableErrString(lineTable)) end end else ! print("Error: Unexpected parseObject :"..parseState.ObjectStack[1].DefType.." "..parseState.ObjectStack[1].Name..". "..LineTableErrString(lineTable)) end elseif lineState.Action == "classname" then *************** *** 2080,2084 **** elseif lineState.Action == "classcomma" then if tag ~= "," then ! print("Error: %property expected ','. "..LineTableErrString(lineTable)) end --- 2079,2083 ---- elseif lineState.Action == "classcomma" then if tag ~= "," then ! print("Error: %class tag expected ','. "..LineTableErrString(lineTable)) end *************** *** 2136,2141 **** lineState.Name = tag ! -- local member= AllocMember(lineState) ! -- table.insert(parseState.ObjectStack[1].Members, member) lineState.Action = "propertycomma" --- 2135,2140 ---- lineState.Name = tag ! -- local member= AllocMember(lineState) ! -- table.insert(parseState.ObjectStack[1].Members, member) lineState.Action = "propertycomma" *************** *** 2625,2629 **** if table.getn(parseState.ObjectStack) ~= 0 then print("parseState.ObjectStack should be empty, has "..table.getn(parseState.ObjectStack).." items left.") ! DumpTable(parseState.ObjectStack, "parseState.ObjectStack") end --- 2624,2628 ---- if table.getn(parseState.ObjectStack) ~= 0 then print("parseState.ObjectStack should be empty, has "..table.getn(parseState.ObjectStack).." items left.") ! TableDump(parseState.ObjectStack, "parseState.ObjectStack") end |