diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-07-31 09:56:59 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2018-08-01 13:17:53 +0000 |
commit | c31719ae7782a9fe771bdeab173264a1a5aa88a2 (patch) | |
tree | a279c68c58e485011347ce761d75eebabb437f4d /src/qml | |
parent | f570d37d737b3e8443e45158c709a4aedf6c95f3 (diff) |
Minor cleanup
Change-Id: I70d59b20761403a3f05ec31f91adda2ff7e5ff5f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml')
-rw-r--r-- | src/qml/jsruntime/qv4functionobject.cpp | 5 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4functionobject_p.h | 9 |
2 files changed, 6 insertions, 8 deletions
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp index 5d2577d81c..8778ba5802 100644 --- a/src/qml/jsruntime/qv4functionobject.cpp +++ b/src/qml/jsruntime/qv4functionobject.cpp @@ -70,10 +70,9 @@ using namespace QV4; DEFINE_OBJECT_VTABLE(FunctionObject); -void Heap::FunctionObject::init(QV4::ExecutionContext *scope, QV4::String *name, - ReturnedValue (*code)(const QV4::FunctionObject *, const Value *thisObject, const Value *argv, int argc)) +void Heap::FunctionObject::init(QV4::ExecutionContext *scope, QV4::String *name, VTable::Call call) { - jsCall = code; + jsCall = call; jsConstruct = QV4::FunctionObject::virtualCallAsConstructor; Object::init(); diff --git a/src/qml/jsruntime/qv4functionobject_p.h b/src/qml/jsruntime/qv4functionobject_p.h index 1acb1df0b4..ba1146af37 100644 --- a/src/qml/jsruntime/qv4functionobject_p.h +++ b/src/qml/jsruntime/qv4functionobject_p.h @@ -80,7 +80,7 @@ DECLARE_HEAP_OBJECT(FunctionObject, Object) { Index_ProtoConstructor = 0 }; - Q_QML_PRIVATE_EXPORT void init(QV4::ExecutionContext *scope, QV4::String *name, ReturnedValue (*code)(const QV4::FunctionObject *, const Value *thisObject, const Value *argv, int argc)); + Q_QML_PRIVATE_EXPORT void init(QV4::ExecutionContext *scope, QV4::String *name, VTable::Call call); void init(QV4::ExecutionContext *scope, QV4::String *name = nullptr, bool createProto = false); void init(QV4::ExecutionContext *scope, QV4::Function *function, bool createProto = false); void init(QV4::ExecutionContext *scope, const QString &name, bool createProto = false); @@ -104,7 +104,7 @@ struct FunctionPrototype : FunctionObject { }; struct IndexedBuiltinFunction : FunctionObject { - inline void init(QV4::ExecutionContext *scope, uint index, ReturnedValue (*code)(const QV4::FunctionObject *, const Value *, const Value *, int)); + inline void init(QV4::ExecutionContext *scope, uint index, VTable::Call call); uint index; }; @@ -231,11 +231,10 @@ struct IndexedBuiltinFunction : FunctionObject V4_OBJECT2(IndexedBuiltinFunction, FunctionObject) }; -void Heap::IndexedBuiltinFunction::init(QV4::ExecutionContext *scope, uint index, - ReturnedValue (*code)(const QV4::FunctionObject *, const Value *thisObject, const Value *argv, int argc)) +void Heap::IndexedBuiltinFunction::init(QV4::ExecutionContext *scope, uint index, VTable::Call call) { Heap::FunctionObject::init(scope); - this->jsCall = code; + this->jsCall = call; this->index = index; } |