aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4object_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4object_p.h')
-rw-r--r--src/qml/jsruntime/qv4object_p.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4object_p.h b/src/qml/jsruntime/qv4object_p.h
index 3a4cb3d9e7..e3361ae160 100644
--- a/src/qml/jsruntime/qv4object_p.h
+++ b/src/qml/jsruntime/qv4object_p.h
@@ -422,6 +422,23 @@ inline ReturnedValue value_convert<Object>(ExecutionEngine *e, const Value &v)
return v.toObject(e->currentContext())->asReturnedValue();
}
+struct ObjectRef : public ManagedRef
+{
+ DEFINE_REF_METHODS(Object, Managed)
+
+ static ObjectRef fromValuePointer(Value *s) {
+ ObjectRef r;
+ r.ptr = s;
+ if (sizeof(void *) == 8)
+ r.ptr->val = 0;
+ else
+ *r.ptr = Value::fromManaged(0);
+ return r;
+ }
+};
+
+DEFINE_REF(ArrayObject, Object);
+
}
QT_END_NAMESPACE