summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorRyan Snyder <ryan@vector35.com>2018-09-25 19:04:35 -0400
committerRyan Snyder <ryan@vector35.com>2018-09-25 19:11:00 -0400
commitae83416100674f381b868c2c8bf2ac600613565d (patch)
tree3548b0611a31656c56128e3dc6151ed5c9d9230a /python
parentd8a12bb8e267812474dfe4b304d33551eabdf32f (diff)
api: remove some lingering xrange uses in python bindings
Diffstat (limited to 'python')
-rw-r--r--python/binaryview.py2
-rw-r--r--python/downloadprovider.py5
-rw-r--r--python/interaction.py2
3 files changed, 5 insertions, 4 deletions
diff --git a/python/binaryview.py b/python/binaryview.py
index 5786a5c8..efffe3e3 100644
--- a/python/binaryview.py
+++ b/python/binaryview.py
@@ -983,7 +983,7 @@ class BinaryView(object):
info_ref = core.BNGetAnalysisInfo(self.handle)
info = info_ref[0]
active_info_list = []
- for i in xrange(0, info.count):
+ for i in range(0, info.count):
func = binaryninja.function.Function(self, core.BNNewFunctionReference(info.activeInfo[i].func))
active_info = ActiveAnalysisInfo(func, info.activeInfo[i].analysisTime, info.activeInfo[i].updateCount, info.activeInfo[i].submitCount)
active_info_list.append(active_info)
diff --git a/python/downloadprovider.py b/python/downloadprovider.py
index 1c94aef3..eb9735f3 100644
--- a/python/downloadprovider.py
+++ b/python/downloadprovider.py
@@ -35,6 +35,7 @@ from binaryninja import log
# 2-3 compatibility
from binaryninja import pyNativeStr
+from binaryninja import range
class DownloadInstance(object):
@@ -85,7 +86,7 @@ class _DownloadProviderMetaclass(type):
count = ctypes.c_ulonglong()
types = core.BNGetDownloadProviderList(count)
result = []
- for i in xrange(0, count.value):
+ for i in range(0, count.value):
result.append(DownloadProvider(types[i]))
core.BNFreeDownloadProviderList(types)
return result
@@ -95,7 +96,7 @@ class _DownloadProviderMetaclass(type):
count = ctypes.c_ulonglong()
types = core.BNGetDownloadProviderList(count)
try:
- for i in xrange(0, count.value):
+ for i in range(0, count.value):
yield DownloadProvider(types[i])
finally:
core.BNFreeDownloadProviderList(types)
diff --git a/python/interaction.py b/python/interaction.py
index e53312cf..1a4d37d5 100644
--- a/python/interaction.py
+++ b/python/interaction.py
@@ -587,7 +587,7 @@ class ReportCollection(object):
def __iter__(self):
count = len(self)
- for i in xrange(0, count):
+ for i in range(0, count):
yield self._report_from_index(i)
def __repr__(self):