From: John L. <jr...@us...> - 2009-10-12 01:50:15
|
Update of /cvsroot/wxlua/wxLua/bindings In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv32577/wxLua/bindings Modified Files: genwxbind.lua Log Message: Allow %define_object/pointer to be used outside of a class %define_object wxPoint wxDefaultPosition Index: genwxbind.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.lua,v retrieving revision 1.184 retrieving revision 1.185 diff -C2 -d -r1.184 -r1.185 *** genwxbind.lua 1 Oct 2009 04:21:00 -0000 1.184 --- genwxbind.lua 12 Oct 2009 01:50:03 -0000 1.185 *************** *** 2139,2148 **** elseif tag == "%define_object" then lineState.DefType = "deftype_%define_object" ! lineState.Action = "action_define" lineState.ActionMandatory = true elseif tag == "%define_pointer" then lineState.DefType = "deftype_%define_pointer" ! lineState.Action = "action_define" lineState.ActionMandatory = true --- 2139,2148 ---- elseif tag == "%define_object" then lineState.DefType = "deftype_%define_object" ! lineState.Action = "action_define_object" lineState.ActionMandatory = true elseif tag == "%define_pointer" then lineState.DefType = "deftype_%define_pointer" ! lineState.Action = "action_define_pointer" lineState.ActionMandatory = true *************** *** 2369,2372 **** --- 2369,2387 ---- lineState.Action = nil lineState.ActionMandatory = false + elseif (lineState.Action == "action_define_object") or (lineState.Action == "action_define_pointer") then + lineState.Name = tag + lineState.DataType = parseState.ObjectStack[1].Name + + -- If we're at the globals level they should have declared this as + -- %define_object wxPoint wxDefaultPosition + if (lineState.DataType == "globals") then + lineState.DataType = tag + lineState.Name = lineTags[t+1] + t = t + 1 + end + + lineState.Action = nil + lineState.ActionMandatory = false + elseif lineState.Action == "action_member" then *************** *** 3180,3184 **** { LuaName = luaname, ! Map = " { \""..luaname.."\", &wxluatype_"..MakeClassVar(parseObject.Name)..", &"..member.Name..", NULL },\n", Condition = fullcondition } --- 3195,3199 ---- { LuaName = luaname, ! Map = " { \""..luaname.."\", &wxluatype_"..MakeClassVar(member.DataType)..", &"..member.Name..", NULL },\n", Condition = fullcondition } |