summaryrefslogtreecommitdiff
path: root/python/mediumlevelil.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/mediumlevelil.py')
-rw-r--r--python/mediumlevelil.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/python/mediumlevelil.py b/python/mediumlevelil.py
index dca7b0c8..a90fb0aa 100644
--- a/python/mediumlevelil.py
+++ b/python/mediumlevelil.py
@@ -99,6 +99,9 @@ class MediumLevelILOperationAndSize(object):
else:
return False
+ def __hash__(self):
+ return hash((self._size, self._operation))
+
@property
def operation(self):
""" """
@@ -356,6 +359,9 @@ class MediumLevelILInstruction(object):
def __repr__(self):
return "<il: %s>" % str(self)
+ def __hash__(self):
+ return hash((self._instr_index, self._function))
+
def __eq__(self, value):
if not isinstance(value, type(self)):
return False
@@ -1141,7 +1147,6 @@ class MediumLevelILFunction(object):
self._source_function = value
-
class MediumLevelILBasicBlock(basicblock.BasicBlock):
def __init__(self, view, handle, owner):
super(MediumLevelILBasicBlock, self).__init__(handle, view)