diff options
author | Filipe Cabecinhas <me@filcab.net> | 2012-05-11 20:39:42 +0000 |
---|---|---|
committer | Filipe Cabecinhas <me@filcab.net> | 2012-05-11 20:39:42 +0000 |
commit | 1a96ef800bc240ca9f0fb89c41ccf47b667c0f49 (patch) | |
tree | aa2b154de8ef00f647d08cfebef7d4870e8141cf /lldb/scripts/Python/interface/SBValueList.i | |
parent | 0bfed4bc7aa3e05389fa8844cb0c9e8a37c6e65b (diff) | |
download | bcm5719-llvm-1a96ef800bc240ca9f0fb89c41ccf47b667c0f49.tar.gz bcm5719-llvm-1a96ef800bc240ca9f0fb89c41ccf47b667c0f49.zip |
Make every Python API __len__() method return a PyIntObject.
swig 2.0+ seems to default to using PyLongObjects, but the __len__()
method _must_ return a PyIntObject.
llvm-svn: 156639
Diffstat (limited to 'lldb/scripts/Python/interface/SBValueList.i')
-rw-r--r-- | lldb/scripts/Python/interface/SBValueList.i | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/scripts/Python/interface/SBValueList.i b/lldb/scripts/Python/interface/SBValueList.i index 1bc904980ef..a55345030c0 100644 --- a/lldb/scripts/Python/interface/SBValueList.i +++ b/lldb/scripts/Python/interface/SBValueList.i @@ -98,8 +98,8 @@ public: FindValueObjectByUID (lldb::user_id_t uid); %pythoncode %{ def __len__(self): - return self.GetSize() - + return int(self.GetSize()) + def __getitem__(self, key): count = len(self) #------------------------------------------------------------ |