diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-08-10 13:00:16 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-08-10 13:00:16 (GMT) |
commit | 400d4cf8aac6d22bf8992bea8e20db91a14469ae (patch) | |
tree | 77775143a1b75d87b2b3fda280b32a46b597d6f6 /src/script/api/qscriptcontextinfo.cpp | |
parent | 70f320f661a0241fcb5fc85f5b9df8e565f5f7e0 (diff) | |
download | Qt-400d4cf8aac6d22bf8992bea8e20db91a14469ae.zip Qt-400d4cf8aac6d22bf8992bea8e20db91a14469ae.tar.gz Qt-400d4cf8aac6d22bf8992bea8e20db91a14469ae.tar.bz2 |
cleanup (hide the use of reinterpret_cast)
Introduce a frameForContext() function so we don't have to cast
all over the place.
Diffstat (limited to 'src/script/api/qscriptcontextinfo.cpp')
-rw-r--r-- | src/script/api/qscriptcontextinfo.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/script/api/qscriptcontextinfo.cpp b/src/script/api/qscriptcontextinfo.cpp index 98d0d52..52776e2 100644 --- a/src/script/api/qscriptcontextinfo.cpp +++ b/src/script/api/qscriptcontextinfo.cpp @@ -42,6 +42,8 @@ #include "qscriptcontextinfo.h" #include "qscriptcontext_p.h" +#include "qscriptengine.h" +#include "qscriptengine_p.h" #include "../bridge/qscriptqobject_p.h" #include <QtCore/qdatastream.h> #include <QtCore/qmetaobject.h> @@ -156,7 +158,7 @@ QScriptContextInfoPrivate::QScriptContextInfoPrivate(const QScriptContext *conte lineNumber = -1; columnNumber = -1; - const JSC::ExecState *frame = reinterpret_cast<const JSC::ExecState *>(context); + const JSC::ExecState *frame = QScriptEnginePrivate::frameForContext(context); JSC::JSObject *callee = frame->callee(); if (callee && callee->isObject(&JSC::InternalFunction::info)) functionName = QScript::qtStringFromJSCUString(JSC::asInternalFunction(callee)->name(&frame->globalData())); |