From effb612334d88ce2f52c728e542bda2902bd35ed Mon Sep 17 00:00:00 2001 From: Ajax Date: Thu, 15 Sep 2016 17:39:46 +0200 Subject: ExprInt: add shortcut for int, long --- miasm2/expression/expression.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'miasm2/expression/expression.py') 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): -- cgit 1.4.1