Fix VALUE/VALUEPTR macros in the interpreter.
authorErik Verbruggen <erik.verbruggen@me.com>
Mon, 3 Jun 2013 11:32:51 +0000 (13:32 +0200)
committerErik Verbruggen <erik.verbruggen@digia.com>
Tue, 4 Jun 2013 08:47:37 +0000 (10:47 +0200)
Change-Id: I04f7625979974809bd62006520f67c5cb2d9c5fd
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
src/qml/qml/v4/moth/qv4vme_moth.cpp

index 9fb38f7..3a11e2a 100644 (file)
@@ -188,13 +188,13 @@ static inline QV4::Value *getValueRef(QV4::ExecutionContext *context,
 }
 
 #if defined(QT_NO_DEBUG)
-# define VALUE(param) *(VALUEPTR(param))
+# define VALUE(param) (*VALUEPTR(param))
 
 // The non-temp case might need some tweaking for QML: there it would probably be a value instead of a local.
 # define VALUEPTR(param) \
-    param.isTemp() ? stack + param.index \
-                   : (param.isLocal() ? static_cast<QV4::CallContext *>(context)->locals + param.index \
-                                      : getValueRef(context, stack, param))
+    (param.isTemp() ? stack + param.index \
+                    : (param.isLocal() ? static_cast<QV4::CallContext *>(context)->locals + param.index \
+                                       : getValueRef(context, stack, param)))
 #else
 # define VALUE(param) *getValueRef(context, stack, param, stackSize)
 # define VALUEPTR(param) getValueRef(context, stack, param, stackSize)