summaryrefslogtreecommitdiff
path: root/python/mediumlevelil.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/mediumlevelil.py')
-rw-r--r--python/mediumlevelil.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/python/mediumlevelil.py b/python/mediumlevelil.py
index f73609cc..624f77a2 100644
--- a/python/mediumlevelil.py
+++ b/python/mediumlevelil.py
@@ -361,6 +361,26 @@ class MediumLevelILInstruction(object):
return False
return self._function == value.function and self._expr_index == value.expr_index
+ def __lt__(self, value):
+ if not isinstance(value, type(self)):
+ return False
+ return self._function == value.function and self.expr_index < value.expr_index
+
+ def __le__(self, value):
+ if not isinstance(value, type(self)):
+ return False
+ return self._function == value.function and self.expr_index <= value.expr_index
+
+ def __gt__(self, value):
+ if not isinstance(value, type(self)):
+ return False
+ return self._function == value.function and self.expr_index > value.expr_index
+
+ def __ge__(self, value):
+ if not isinstance(value, type(self)):
+ return False
+ return self._function == value.function and self.expr_index >= value.expr_index
+
@property
def tokens(self):
"""MLIL tokens (read-only)"""