From: John L. <jr...@us...> - 2006-05-03 22:52:21
|
Update of /cvsroot/wxlua/wxLua/bindings In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27806/wxLua/bindings Modified Files: genwxbind.lua Log Message: don't track pushed wxWindows using EVT_DESTROY twice update geometry.i to 2.6.3 fix unary op - to use op_neg and fix binding operators in general update docs for op_neg Index: genwxbind.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.lua,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** genwxbind.lua 2 May 2006 05:25:01 -0000 1.59 --- genwxbind.lua 3 May 2006 22:52:17 -0000 1.60 *************** *** 219,222 **** --- 219,223 ---- functionAttribs["static"] = true functionAttribs["virtual"] = true + functionAttribs["inline"] = true end *************** *** 967,971 **** operators["+"] = "op_add" ! operators["-"] = "op_sub" operators["*"] = "op_mul" operators["/"] = "op_div" --- 968,972 ---- operators["+"] = "op_add" ! operators["-"] = "op_sub" -- also op_neg if unary - operators["*"] = "op_mul" operators["/"] = "op_div" *************** *** 2142,2146 **** elseif lineState.IsOperator and string.find(tag, "operator", 1, 1) then ! -- eat the rest of the "operator+=" symbols which may be split before ( while lineTags[t+1] and (not string.find(lineTags[t+1], "(", 1, 1)) do tag = tag..lineTags[t+1] --- 2143,2147 ---- elseif lineState.IsOperator and string.find(tag, "operator", 1, 1) then ! -- eat the rest of the "operator+=(...)" symbols which may be split before ( while lineTags[t+1] and (not string.find(lineTags[t+1], "(", 1, 1)) do tag = tag..lineTags[t+1] *************** *** 3328,3331 **** --- 3329,3340 ---- end + -- special case for unary -, convert from op_sub to op_neg if necessary + if member.IsOperator and (table.getn(member.Params) == 0) and (member.Name == "op_sub") then + member.Name = "op_neg" + if member.AltName == "op_sub" then -- maybe they renamed it? + member.AltName = "op_neg" + end + end + funcName = "wxLua_"..MakeVar(parseObject.Name).."_"..MakeVar(member.AltName) if member.IsOverload then *************** *** 3503,3507 **** if member.IsOperator then memberPtr = false ! functor = "(*self)"..member.IsOperator -- static member function? elseif string.find(member.Name, "::") then --- 3512,3520 ---- if member.IsOperator then memberPtr = false ! if paramCount > 0 then ! functor = "(*self)"..member.IsOperator ! else ! functor = member.IsOperator.."(*self)" ! end -- static member function? elseif string.find(member.Name, "::") then *************** *** 3517,3522 **** end -- Add Function Argument List ! if argList ~= "" or member.IsFunction then functor = functor.."("..argList..")" end --- 3530,3537 ---- end + local is_func = iff(not member.IsOperator and member.IsFunction, true, false) + -- Add Function Argument List ! if argList ~= "" or is_func then functor = functor.."("..argList..")" end *************** *** 3533,3537 **** else -- call function, get return value ! if (not intrinsic) and (not memberPtr) then if (comment_cpp_binding_code) then table.insert(codeList, " // allocate a new object using the copy constructor\n") --- 3548,3555 ---- else -- call function, get return value ! if member.IsOperator and origMemberPtr and string.find(origMemberPtr, "&", 1, 1) then ! table.insert(codeList, " returns = self;\n") ! table.insert(codeList, " *returns = ("..functor..");\n") ! elseif (not intrinsic) and (not memberPtr) then if (comment_cpp_binding_code) then table.insert(codeList, " // allocate a new object using the copy constructor\n") *************** *** 4478,4482 **** overloadCount = overloadCount + 1 + table.getn(v) - print(overloadCount, table.getn(v)) end --- 4496,4499 ---- |