summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/lowlevelil.py3
-rw-r--r--python/mediumlevelil.py3
2 files changed, 6 insertions, 0 deletions
diff --git a/python/lowlevelil.py b/python/lowlevelil.py
index 2609f761..90ecbd74 100644
--- a/python/lowlevelil.py
+++ b/python/lowlevelil.py
@@ -511,6 +511,9 @@ class LowLevelILInstruction(object):
def __repr__(self):
return "<il: %s>" % str(self)
+ def __eq__(self, value):
+ return self.function == value.function and self.expr_index == value.expr_index
+
@property
def tokens(self):
"""LLIL tokens (read-only)"""
diff --git a/python/mediumlevelil.py b/python/mediumlevelil.py
index d997fa76..e8d58f96 100644
--- a/python/mediumlevelil.py
+++ b/python/mediumlevelil.py
@@ -317,6 +317,9 @@ class MediumLevelILInstruction(object):
def __repr__(self):
return "<il: %s>" % str(self)
+ def __eq__(self, value):
+ return self.function == value.function and self.expr_index == value.expr_index
+
@property
def tokens(self):
"""MLIL tokens (read-only)"""