about summary refs log tree commit diff stats
path: root/miasm2/expression/expression.py
diff options
context:
space:
mode:
Diffstat (limited to 'miasm2/expression/expression.py')
-rw-r--r--miasm2/expression/expression.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/miasm2/expression/expression.py b/miasm2/expression/expression.py
index 59840b5b..f0491f1a 100644
--- a/miasm2/expression/expression.py
+++ b/miasm2/expression/expression.py
@@ -787,11 +787,14 @@ class ExprMem(Expr):
 
     __slots__ = Expr.__slots__ + ["_arg"]
 
-    def __init__(self, arg, size=32):
+    def __init__(self, arg, size=None):
         """Create an ExprMem
         @arg: Expr, memory access address
         @size: int, memory access size
         """
+        if size is None:
+            warnings.warn('DEPRECATION WARNING: size is a mandatory argument: use ExprMem(arg, SIZE)')
+            size = 32
 
         # arg must be Expr
         assert isinstance(arg, Expr)
@@ -810,7 +813,7 @@ class ExprMem(Expr):
         state = self._arg, self._size
         return self.__class__, state
 
-    def __new__(cls, arg, size=32):
+    def __new__(cls, arg, size=None):
         return Expr.get_object(cls, (arg, size))
 
     def __str__(self):