diff options
| author | Camille Mougey <commial@gmail.com> | 2018-04-19 19:26:09 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-04-19 19:26:09 +0200 |
| commit | a4dbb99d5d169d79828caec9e20dc4392f9be95a (patch) | |
| tree | cbba60755e94e26ac29aa2574d93358c1c73ab5c /miasm2/ir | |
| parent | 145c218af968bea37ecc8a89585686e68566a875 (diff) | |
| parent | 7d4100ea290c0bd60ee225a401786bc856d92615 (diff) | |
| download | miasm-a4dbb99d5d169d79828caec9e20dc4392f9be95a.tar.gz miasm-a4dbb99d5d169d79828caec9e20dc4392f9be95a.zip | |
Merge pull request #725 from serpilliere/fix_eq_ne
Fix __ne__ calls
Diffstat (limited to 'miasm2/ir')
| -rw-r--r-- | miasm2/ir/ir.py | 3 | ||||
| -rw-r--r-- | miasm2/ir/symbexec.py | 3 | ||||
| -rw-r--r-- | miasm2/ir/symbexec_top.py | 3 |
3 files changed, 9 insertions, 0 deletions
diff --git a/miasm2/ir/ir.py b/miasm2/ir/ir.py index 982399da..1c6895e0 100644 --- a/miasm2/ir/ir.py +++ b/miasm2/ir/ir.py @@ -177,6 +177,9 @@ class AssignBlock(object): return False return all(other[dst] == src for dst, src in self.iteritems()) + def __ne__(self, other): + return not self.__eq__(other) + def __len__(self): return len(self._assigns) diff --git a/miasm2/ir/symbexec.py b/miasm2/ir/symbexec.py index 3cde2af7..4070f261 100644 --- a/miasm2/ir/symbexec.py +++ b/miasm2/ir/symbexec.py @@ -53,6 +53,9 @@ class SymbolicState(StateEngine): return False return self.symbols == other.symbols + def __ne__(self, other): + return not self.__eq__(other) + def __iter__(self): for dst, src in self._symbols: yield dst, src diff --git a/miasm2/ir/symbexec_top.py b/miasm2/ir/symbexec_top.py index 71837ed0..1e1e76e9 100644 --- a/miasm2/ir/symbexec_top.py +++ b/miasm2/ir/symbexec_top.py @@ -39,6 +39,9 @@ class SymbolicStateTop(StateEngine): return (self.symbols == other.symbols and self.regstop == other.regstop) + def __ne__(self, other): + return not self.__eq__(other) + def __iter__(self): for dst, src in self._symbols: yield dst, src |