From: John L. <jr...@us...> - 2008-10-29 04:44:46
|
Update of /cvsroot/wxlua/wxLua/bindings In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv1748/wxLua/bindings Modified Files: genwxbind.lua Log Message: Fix [] operator for returning a reference & to a class. Simplify code for operators that return a reference to the self. (=, +=, -=, etc) Index: genwxbind.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.lua,v retrieving revision 1.173 retrieving revision 1.174 diff -C2 -d -r1.173 -r1.174 *** genwxbind.lua 27 Oct 2008 02:27:19 -0000 1.173 --- genwxbind.lua 29 Oct 2008 04:44:32 -0000 1.174 *************** *** 3797,3803 **** else -- call function, get return value ! if member["%operator"] and origMemberPtr and string.find(origMemberPtr, "&", 1, 1) then table.insert(codeList, " "..memberTypeWithAttrib.." returns = self;\n") ! table.insert(codeList, " *returns = ("..functor..");\n") elseif (not numeric) and (not memberPtr) then CommentBindingTable(codeList, " // allocate a new object using the copy constructor\n") --- 3797,3809 ---- else -- call function, get return value ! if member["%operator"] and string.find(origMemberPtr or "", "&", 1, 1) and string.find(member["%operator"], "=", 1, 1) then ! table.insert(codeList, " "..functor..";\n") table.insert(codeList, " "..memberTypeWithAttrib.." returns = self;\n") ! elseif member["%operator"] and string.find(origMemberPtr or "", "&", 1, 1) and (string.find(member["%operator"], "=", 1, 1) == nil) then ! if string.find(memberTypeWithAttrib or "", "*", 1, 1) then ! table.insert(codeList, " "..memberTypeWithAttrib.." returns = &"..functor..";\n") ! else ! table.insert(codeList, " "..memberTypeWithAttrib.." returns = "..functor..";\n") ! end elseif (not numeric) and (not memberPtr) then CommentBindingTable(codeList, " // allocate a new object using the copy constructor\n") |