diff options
Diffstat (limited to 'python/lowlevelil.py')
| -rw-r--r-- | python/lowlevelil.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/python/lowlevelil.py b/python/lowlevelil.py index 7733fdcc..c6ee2b4a 100644 --- a/python/lowlevelil.py +++ b/python/lowlevelil.py @@ -1073,21 +1073,33 @@ class LowLevelILConstantBase(LowLevelILInstruction, Constant): return self.constant != 0 def __eq__(self, other: 'LowLevelILConstantBase'): + if not isinstance(other, self.__class__): + return NotImplemented return self.constant == other.constant def __ne__(self, other: 'LowLevelILConstantBase'): + if not isinstance(other, self.__class__): + return NotImplemented return self.constant != other.constant def __lt__(self, other: 'LowLevelILConstantBase'): + if not isinstance(other, self.__class__): + return NotImplemented return self.constant < other.constant def __gt__(self, other: 'LowLevelILConstantBase'): + if not isinstance(other, self.__class__): + return NotImplemented return self.constant > other.constant def __le__(self, other: 'LowLevelILConstantBase'): + if not isinstance(other, self.__class__): + return NotImplemented return self.constant <= other.constant def __ge__(self, other: 'LowLevelILConstantBase'): + if not isinstance(other, self.__class__): + return NotImplemented return self.constant >= other.constant def __hash__(self): |
