diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/highlevelil.py | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/python/highlevelil.py b/python/highlevelil.py index 6b197fac..e815df48 100644 --- a/python/highlevelil.py +++ b/python/highlevelil.py @@ -344,12 +344,32 @@ class HighLevelILInstruction(object): def __eq__(self, other): if not isinstance(other, self.__class__): return NotImplemented - return (self._function, self._expr_index) == (other._function, other._expr_index) + return core.BNHighLevelILExprEqual(self._function.handle, self._expr_index, other._function.handle, other._expr_index) def __ne__(self, other): if not isinstance(other, self.__class__): return NotImplemented - return not (self == other) + return not core.BNHighLevelILExprEqual(self._function.handle, self._expr_index, other._function.handle, other._expr_index) + + def __lt__(self, other): + if not isinstance(other, self.__class__): + return NotImplemented + return core.BNHighLevelILExprLessThan(self._function.handle, self._expr_index, other._function.handle, other._expr_index) + + def __le__(self, other): + if not isinstance(other, self.__class__): + return NotImplemented + return not core.BNHighLevelILExprLessThan(other._function.handle, other._expr_index, self._function.handle, self._expr_index) + + def __gt__(self, other): + if not isinstance(other, self.__class__): + return NotImplemented + return core.BNHighLevelILExprLessThan(other._function.handle, other._expr_index, self._function.handle, self._expr_index) + + def __ge__(self, other): + if not isinstance(other, self.__class__): + return NotImplemented + return not core.BNHighLevelILExprLessThan(self._function.handle, self._expr_index, other._function, other._expr_index) def __hash__(self): return hash((self._function, self._expr_index)) |
