diff options
| author | Ajax <commial@gmail.com> | 2016-09-15 17:39:46 +0200 |
|---|---|---|
| committer | Ajax <commial@gmail.com> | 2016-09-16 08:13:54 +0200 |
| commit | effb612334d88ce2f52c728e542bda2902bd35ed (patch) | |
| tree | e7cacb0110cbaaf9a7641a200e8500fc608a1fec | |
| parent | 87e54bf72bead0ff71d7c2a5f9461ff96eb49e9b (diff) | |
| download | miasm-effb612334d88ce2f52c728e542bda2902bd35ed.tar.gz miasm-effb612334d88ce2f52c728e542bda2902bd35ed.zip | |
ExprInt: add shortcut for int, long
| -rw-r--r-- | miasm2/expression/expression.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/miasm2/expression/expression.py b/miasm2/expression/expression.py index c9c2627c..566db9f5 100644 --- a/miasm2/expression/expression.py +++ b/miasm2/expression/expression.py @@ -411,6 +411,12 @@ class ExprInt(Expr): def graph_recursive(self, graph): graph.add_node(self) + def __int__(self): + return int(self.arg) + + def __long__(self): + return long(self.arg) + class ExprId(Expr): |