summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/Python/interface/SBProcess.i
diff options
context:
space:
mode:
authorFilipe Cabecinhas <me@filcab.net>2012-05-11 20:39:42 +0000
committerFilipe Cabecinhas <me@filcab.net>2012-05-11 20:39:42 +0000
commit1a96ef800bc240ca9f0fb89c41ccf47b667c0f49 (patch)
treeaa2b154de8ef00f647d08cfebef7d4870e8141cf /lldb/scripts/Python/interface/SBProcess.i
parent0bfed4bc7aa3e05389fa8844cb0c9e8a37c6e65b (diff)
downloadbcm5719-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/SBProcess.i')
-rw-r--r--lldb/scripts/Python/interface/SBProcess.i3
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/scripts/Python/interface/SBProcess.i b/lldb/scripts/Python/interface/SBProcess.i
index 37100557f9c..2069adf2de0 100644
--- a/lldb/scripts/Python/interface/SBProcess.i
+++ b/lldb/scripts/Python/interface/SBProcess.i
@@ -321,7 +321,8 @@ public:
self.sbprocess = sbprocess
def __len__(self):
- if self.sbprocess: return self.sbprocess.GetNumThreads()
+ if self.sbprocess:
+ return int(self.sbprocess.GetNumThreads())
return 0
def __getitem__(self, key):
OpenPOWER on IntegriCloud