Properly namespace the math header
authorLars Knoll <lars.knoll@digia.com>
Sat, 17 Nov 2012 21:14:06 +0000 (22:14 +0100)
committerSimon Hausmann <simon.hausmann@digia.com>
Mon, 19 Nov 2012 09:29:53 +0000 (10:29 +0100)
Change-Id: I0f4ac76376028081b13b1cdeaadc4c9b09c1556d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
qmljs_math.h
qmljs_runtime.h

index 873e893..492f7c8 100644 (file)
@@ -48,6 +48,9 @@
 
 #if !defined(QMLJS_LLVM_RUNTIME) && 1 //CPU(X86_64)
 
+namespace QQmlJS {
+namespace VM {
+
 static inline Value add_int32(int a, int b)
 {
     quint8 overflow = 0;
@@ -97,4 +100,7 @@ static inline Value mul_int32(int a, int b)
 }
 #endif
 
+} // namespace VM
+} // namespace QQmlJS
+
 #endif
index 549c8a4..bc404e9 100644 (file)
@@ -42,6 +42,7 @@
 #define QMLJS_RUNTIME_H
 
 #include <qmljs_value.h>
+#include <qmljs_math.h>
 
 #include <QtCore/QString>
 #include <QtCore/qnumeric.h>
@@ -258,14 +259,6 @@ Bool __qmljs_cmp_sne(Value left, Value right, ExecutionContext *ctx);
 Bool __qmljs_cmp_instanceof(Value left, Value right, ExecutionContext *ctx);
 Bool __qmljs_cmp_in(Value left, Value right, ExecutionContext *ctx);
 
-} // extern "C"
-
-
-#include <qmljs_math.h>
-
-
-extern "C" {
-
 // type conversion and testing
 inline Value __qmljs_to_primitive(Value value, ExecutionContext *ctx, int typeHint)
 {