[Python] Implement truth testing for lldb.value
authorJonas Devlieghere <jonas@devlieghere.com>
Wed, 4 Sep 2019 18:59:10 +0000 (18:59 +0000)
committerJonas Devlieghere <jonas@devlieghere.com>
Wed, 4 Sep 2019 18:59:10 +0000 (18:59 +0000)
commit24223eb24c74a116e1a3eb704d28e61454719a74
treed69085e3630ccec381cb2942cc1f2fe75e9fcd99
parent5559406ae5d21fab0bcd6a07347f4f928d3c7ce8
[Python] Implement truth testing for lldb.value

Python 3 calls __bool__() instead of __len__() and lldb.value only
implemented the __len__ method. This adds the __bool__() implementation.

Differential revision: https://reviews.llvm.org/D67183

llvm-svn: 370953
lldb/packages/Python/lldbsuite/test/python_api/value/TestValueAPI.py
lldb/scripts/Python/python-extensions.swig