[ https://issues.apache.org/jira/browse/THRIFT-4883?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James E. King III updated THRIFT-4883: -------------------------------------- Fix Version/s: (was: 0.13.0) > 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 > 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)