Python 3 - Use six in our embedded Python glue code.

llvm-svn: 252767
This commit is contained in:
Zachary Turner 2015-11-11 17:59:57 +00:00
parent a52b4da039
commit d4870df9bf
2 changed files with 3 additions and 1 deletions

View File

@ -146,7 +146,7 @@ public:
for x in range(*key.indices(self.__len__())):
list.append(self.__getitem__(x))
return list
if not (isinstance(key,(int,long))):
if not (isinstance(key,six.integer_types)):
raise TypeError('must be int')
key = key * self.item_size # SBData uses byte-based indexes, but we want to use itemsize-based indexes here
error = SBError()

View File

@ -41,6 +41,8 @@ o SBLineEntry: Specifies an association with a contiguous range of instructions
import uuid
import re
import os
import six
%}
%include "./Python/python-typemaps.swig"