[
https://issues.apache.org/jira/browse/THRIFT-3584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15138413#comment-15138413
]
Hudson commented on THRIFT-3584:
--------------------------------
SUCCESS: Integrated in Thrift-precommit #45 (See
[https://builds.apache.org/job/Thrift-precommit/45/])
THRIFT-3584 Lua: boolean false value cannot be transferred (nsuke:
[https://github.com/apache/thrift/commit/cfebe7e2c6dfb42a8872bb831eaf3a2278d4fc73])
* compiler/cpp/src/generate/t_lua_generator.cc
THRIFT-3584 boolean false value cannot be transferred (nsuke:
[https://github.com/apache/thrift/commit/1f647f01c4494222ff82008f555cc77c2868d434])
* compiler/cpp/src/generate/t_lua_generator.cc
* test/lua/test_basic_client.lua
> boolean false value cannot be transferred
> -----------------------------------------
>
> Key: THRIFT-3584
> URL: https://issues.apache.org/jira/browse/THRIFT-3584
> Project: Thrift
> Issue Type: Bug
> Components: Lua - Compiler
> Affects Versions: 0.9.3
> Environment: Linux Windows
> Reporter: WangYaofu
> Assignee: WangYaofu
> Fix For: 0.9.4
>
>
> To check element of self whether nil or not,avoid the value(false) of BOOL is
> lost.
> eg.
> {code:title=Before}
> if self.argBool then
> oprot:writeFieldBegin('argBool', TType.BOOL, 13)
> oprot:writeBool(self.argBool)
> oprot:writeFieldEnd()
> end
> {code}
> {code:title=After}
> if self.argBool ~= nil then
> oprot:writeFieldBegin('argBool', TType.BOOL, 13)
> oprot:writeBool(self.argBool)
> oprot:writeFieldEnd()
> end
> {code}
> Why:
> the value(false) for parameter self.argBool will be lost when condition is
> 'if self.argBool then' as before.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)