[ https://issues.apache.org/jira/browse/THRIFT-4883?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16869831#comment-16869831 ]
James E. King III commented on THRIFT-4883: ------------------------------------------- This change broke the build in the pull request. I suspect it is unnecessary; I am pulling it out of the 0.13.0 release cycle. > Thrift 0.12.0 source lua lib has a mistake > ------------------------------------------ > > Key: THRIFT-4883 > URL: https://issues.apache.org/jira/browse/THRIFT-4883 > Project: Thrift > Issue Type: Bug > Components: Lua - Library > Affects Versions: 0.12.0 > Reporter: Nguyen Duc Duy > Priority: Major > Labels: easyfix > Fix For: 0.13.0 > > Attachments: Thrift.lua > > Time Spent: 10m > Remaining Estimate: 0h > > {code:java} > function __TObject:new(init_obj) > local obj = {} > if ttype(obj) == 'table' then > obj = init_obj > end > -- Use the __parent key and the __index function to achieve inheritance > obj.__parent = self > setmetatable(obj, __TObject.__mt) > return obj > end{code} > In the above code in file Thrift.lua from lib lua in thrift project. I saw > that it should check if init_obj is a table but this code is checking obj(a > table as declare ?). > So i think the source must beĀ > {code:java} > function __TObject:new(init_obj) > local obj = {} > if ttype(init_obj) == 'table' then > obj = init_obj > end > -- Use the __parent key and the __index function to achieve inheritance > obj.__parent = self > setmetatable(obj, __TObject.__mt) > return obj > end > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)