From dba56a752c932670c0e9461f106d2bc084276b6f Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 9 May 2014 12:15:23 +0200 Subject: Convert remaining FunctionObject's to new constructor scheme Change-Id: I440d5b128d0ee28566ebfa82c2505a4bd97bba6b Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4regexpobject.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/qml/jsruntime/qv4regexpobject.cpp') 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(scope, ctx->d()->engine->regExpCtor); - regExpCtor->clearLastMatch(); + regExpCtor->d()->clearLastMatch(); if (result == -1) { r->lastIndexProperty(ctx)->value = Primitive::fromInt32(0); -- cgit v1.2.1