aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4object_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-09-19 12:55:36 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-22 01:06:20 +0200
commita9bdc91cefabb3729d0240fce4c01a669be09dbf (patch)
tree6f2a2639164ec1a530ccc33bc96bece299df0dbf /src/qml/jsruntime/qv4object_p.h
parent49369e62b50a4f903a5b2fcbfbfbc1f6f2838e8e (diff)
Fix some more methods to take ValueRef's
Change-Id: Ia0e30ba98c16e51c9992027c7e5f78d4def8697a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4object_p.h')
-rw-r--r--src/qml/jsruntime/qv4object_p.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/qml/jsruntime/qv4object_p.h b/src/qml/jsruntime/qv4object_p.h
index b97d682c3d..03cc56ac79 100644
--- a/src/qml/jsruntime/qv4object_p.h
+++ b/src/qml/jsruntime/qv4object_p.h
@@ -186,10 +186,10 @@ struct Q_QML_EXPORT Object: Managed {
return idx;
}
- uint allocArrayValue(Value v) {
+ uint allocArrayValue(const ValueRef v) {
uint idx = allocArrayValue();
Property *pd = &arrayData[idx];
- pd->value = v;
+ pd->value = *v;
return idx;
}
void freeArrayValue(int idx) {
@@ -228,7 +228,7 @@ public:
Property *arrayInsert(uint index, PropertyAttributes attributes = Attr_Data);
void arraySet(uint index, const Property *pd);
- void arraySet(uint index, Value value);
+ void arraySet(uint index, ValueRef value);
uint propertyIndexFromArrayIndex(uint index) const
{
@@ -261,7 +261,7 @@ public:
void markArrayObjects() const;
- void push_back(Value v);
+ void push_back(const ValueRef v);
SparseArrayNode *sparseArrayBegin() { return sparseArray ? sparseArray->begin() : 0; }
SparseArrayNode *sparseArrayEnd() { return sparseArray ? sparseArray->end() : 0; }
@@ -397,13 +397,13 @@ inline void Object::setArrayLengthUnchecked(uint l)
}
}
-inline void Object::push_back(Value v)
+inline void Object::push_back(const ValueRef v)
{
uint idx = arrayLength();
if (!sparseArray) {
if (idx >= arrayAlloc)
arrayReserve(idx + 1);
- arrayData[idx].value = v;
+ arrayData[idx].value = *v;
arrayDataLen = idx + 1;
} else {
uint idx = allocArrayValue(v);
@@ -445,10 +445,10 @@ inline Property *Object::arrayInsert(uint index, PropertyAttributes attributes)
return pd;
}
-inline void Object::arraySet(uint index, Value value)
+inline void Object::arraySet(uint index, ValueRef value)
{
Property *pd = arrayInsert(index);
- pd->value = value;
+ pd->value = *value;
}
inline void Object::arraySet(uint index, const Property *pd)