From 7bbe7721e476a44cf703fecc0d4b5e35bc676968 Mon Sep 17 00:00:00 2001 From: Ryan Snyder Date: Tue, 25 Sep 2018 19:04:35 -0400 Subject: api: remove some lingering xrange uses in python bindings --- python/binaryview.py | 2 +- python/downloadprovider.py | 5 +++-- python/interaction.py | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) (limited to 'python') diff --git a/python/binaryview.py b/python/binaryview.py index 5802c3ba..84dd0f69 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -1084,7 +1084,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): -- cgit v1.3.1