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
This commit is contained in:
Filipe Cabecinhas
2012-05-11 20:39:42 +00:00
parent 0bfed4bc7a
commit 1a96ef800b
9 changed files with 12 additions and 11 deletions

View File

@@ -116,7 +116,7 @@ public:
def __len__(self):
if self.sbblock:
return self.sbblock.GetNumRanges()
return int(self.sbblock.GetNumRanges())
return 0
def __getitem__(self, key):