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

@@ -259,7 +259,7 @@ public:
def __len__(self):
if self.sbmodule:
return self.sbmodule.GetNumSymbols()
return int(self.sbmodule.GetNumSymbols())
return 0
def __getitem__(self, key):
@@ -315,7 +315,7 @@ public:
def __len__(self):
if self.sbmodule:
return self.sbmodule.GetNumSections()
return int(self.sbmodule.GetNumSections())
return 0
def __getitem__(self, key):