aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4regexpobject.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2014-05-09 12:15:23 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2014-07-22 13:49:18 +0200
commitdba56a752c932670c0e9461f106d2bc084276b6f (patch)
tree3a669663fa85dd3d61a83c29e8961b70ac53f046 /src/qml/jsruntime/qv4regexpobject.cpp
parent00fa9049112385f65ccdcad02b8712a32626d20c (diff)
Convert remaining FunctionObject's to new constructor scheme
Change-Id: I440d5b128d0ee28566ebfa82c2505a4bd97bba6b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4regexpobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4regexpobject.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/qml/jsruntime/qv4regexpobject.cpp b/src/qml/jsruntime/qv4regexpobject.cpp
index f7135d9608..6a592ee792 100644
--- a/src/qml/jsruntime/qv4regexpobject.cpp
+++ b/src/qml/jsruntime/qv4regexpobject.cpp
@@ -237,19 +237,19 @@ uint RegExpObject::flags() const
DEFINE_OBJECT_VTABLE(RegExpCtor);
-RegExpCtor::RegExpCtor(ExecutionContext *scope)
- : FunctionObject(scope, QStringLiteral("RegExp"))
+RegExpCtor::Data::Data(ExecutionContext *scope)
+ : FunctionObject::Data(scope, QStringLiteral("RegExp"))
{
setVTable(staticVTable());
clearLastMatch();
}
-void RegExpCtor::clearLastMatch()
+void RegExpCtor::Data::clearLastMatch()
{
- d()->lastMatch = Primitive::nullValue();
- d()->lastInput = engine()->id_empty;
- d()->lastMatchStart = 0;
- d()->lastMatchEnd = 0;
+ lastMatch = Primitive::nullValue();
+ lastInput = internalClass->engine->id_empty;
+ lastMatchStart = 0;
+ lastMatchEnd = 0;
}
ReturnedValue RegExpCtor::construct(Managed *m, CallData *callData)
@@ -379,7 +379,7 @@ ReturnedValue RegExpPrototype::method_exec(CallContext *ctx)
const int result = r->value()->match(s, offset, matchOffsets);
Scoped<RegExpCtor> regExpCtor(scope, ctx->d()->engine->regExpCtor);
- regExpCtor->clearLastMatch();
+ regExpCtor->d()->clearLastMatch();
if (result == -1) {
r->lastIndexProperty(ctx)->value = Primitive::fromInt32(0);