aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4scopedvalue_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2014-11-18 21:22:44 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2014-12-20 15:16:39 +0100
commite7b66a60584b3fcb1436a7dbe8396b71cb69fe1b (patch)
tree4ff62f582408df5e948063c18420f61b262c7334 /src/qml/jsruntime/qv4scopedvalue_p.h
parent74c658bb631fd5bab433b9867ff2e568a56ec082 (diff)
Make Managed inherit Value
This completes the first milestone towards being able to move objects across the GC heap. Change-Id: I8e6ce90254ea767188a31f0dc85b133534c87eb0 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4scopedvalue_p.h')
-rw-r--r--src/qml/jsruntime/qv4scopedvalue_p.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4scopedvalue_p.h b/src/qml/jsruntime/qv4scopedvalue_p.h
index f408f8269d..3a16eb73ce 100644
--- a/src/qml/jsruntime/qv4scopedvalue_p.h
+++ b/src/qml/jsruntime/qv4scopedvalue_p.h
@@ -206,9 +206,9 @@ struct Scoped
inline void setPointer(Managed *p) {
#if QT_POINTER_SIZE == 8
- ptr->val = (quint64)(p ? &p->data : 0);
+ ptr->m = p ? p->m : 0;
#else
- *ptr = p ? QV4::Value::fromManaged(p) : QV4::Primitive::undefinedValue();
+ *ptr = QV4::Value::fromManaged(p);
#endif
}
@@ -437,7 +437,7 @@ inline Value &Value::operator=(const ValueRef v)
template<typename T>
inline TypedValue<T> &TypedValue<T>::operator =(T *t)
{
- m = t ? &t->data : 0;
+ m = t ? t->m : 0;
#if QT_POINTER_SIZE == 4
tag = Managed_Type;
#endif