[Lldb-commits] [lldb] r252767 - Python 3 - Use six in our embedded Python glue code.
Zachary Turner via lldb-commits
lldb-commits at lists.llvm.org
Wed Nov 11 09:59:57 PST 2015
Author: zturner
Date: Wed Nov 11 11:59:57 2015
New Revision: 252767
URL: http://llvm.org/viewvc/llvm-project?rev=252767&view=rev
Log:
Python 3 - Use six in our embedded Python glue code.
Modified:
lldb/trunk/scripts/interface/SBData.i
lldb/trunk/scripts/lldb.swig
Modified: lldb/trunk/scripts/interface/SBData.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBData.i?rev=252767&r1=252766&r2=252767&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBData.i (original)
+++ lldb/trunk/scripts/interface/SBData.i Wed Nov 11 11:59:57 2015
@@ -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()
Modified: lldb/trunk/scripts/lldb.swig
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/lldb.swig?rev=252767&r1=252766&r2=252767&view=diff
==============================================================================
--- lldb/trunk/scripts/lldb.swig (original)
+++ lldb/trunk/scripts/lldb.swig Wed Nov 11 11:59:57 2015
@@ -41,6 +41,8 @@ o SBLineEntry: Specifies an association
import uuid
import re
import os
+
+import six
%}
%include "./Python/python-typemaps.swig"
More information about the lldb-commits
mailing list