mirror of
https://github.com/intel/llvm.git
synced 2026-02-07 07:39:11 +08:00
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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user