diff options
| author | Jordan Wiens <jordan@psifertex.com> | 2018-05-29 14:32:08 -0400 |
|---|---|---|
| committer | Ryan Snyder <ryan@vector35.com> | 2018-07-10 18:11:08 -0400 |
| commit | 1c03ac08aa94f5bedf21ec8f48ee1ec998e0e50c (patch) | |
| tree | 0c10026079b3f0a50affb6b5d42cc3684056e5fc /python/plugin.py | |
| parent | d4d1fbb390c9a31045cea8e612c02e242d11c438 (diff) | |
addition 3 compatibility changes
Diffstat (limited to 'python/plugin.py')
| -rw-r--r-- | python/plugin.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/python/plugin.py b/python/plugin.py index 4cf6fb77..52feced4 100644 --- a/python/plugin.py +++ b/python/plugin.py @@ -30,6 +30,7 @@ from binaryninja.enums import PluginCommandType #2-3 compatibility from six import with_metaclass +from six.moves import range class PluginCommandContext(object): @@ -49,7 +50,7 @@ class _PluginCommandMetaClass(type): count = ctypes.c_ulonglong() commands = core.BNGetAllPluginCommands(count) result = [] - for i in xrange(0, count.value): + for i in range(0, count.value): result.append(PluginCommand(commands[i])) core.BNFreePluginCommandList(commands) return result @@ -59,7 +60,7 @@ class _PluginCommandMetaClass(type): count = ctypes.c_ulonglong() commands = core.BNGetAllPluginCommands(count) try: - for i in xrange(0, count.value): + for i in range(0, count.value): yield PluginCommand(commands[i]) finally: core.BNFreePluginCommandList(commands) @@ -568,7 +569,7 @@ class _BackgroundTaskMetaclass(type): count = ctypes.c_ulonglong() tasks = core.BNGetRunningBackgroundTasks(count) result = [] - for i in xrange(0, count.value): + for i in range(0, count.value): result.append(BackgroundTask(handle=core.BNNewBackgroundTaskReference(tasks[i]))) core.BNFreeBackgroundTaskList(tasks, count.value) return result @@ -578,7 +579,7 @@ class _BackgroundTaskMetaclass(type): count = ctypes.c_ulonglong() tasks = core.BNGetRunningBackgroundTasks(count) try: - for i in xrange(0, count.value): + for i in range(0, count.value): yield BackgroundTask(handle=core.BNNewBackgroundTaskReference(tasks[i])) finally: core.BNFreeBackgroundTaskList(tasks, count.value) |
