diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-08-05 09:35:51 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-08-05 09:35:51 (GMT) |
commit | 791bddfcd5cc7540219835ef5d91486acd833c4b (patch) | |
tree | 10139fab690670a9dbf97b3cd4647eec78c6cbc2 /src/script | |
parent | f22c8da7c2c98cb25642c255c4b4f05fa4e4da3d (diff) | |
download | Qt-791bddfcd5cc7540219835ef5d91486acd833c4b.zip Qt-791bddfcd5cc7540219835ef5d91486acd833c4b.tar.gz Qt-791bddfcd5cc7540219835ef5d91486acd833c4b.tar.bz2 |
add type info and attribute getters for function wrappers
Diffstat (limited to 'src/script')
-rw-r--r-- | src/script/bridge/qscriptfunction.cpp | 2 | ||||
-rw-r--r-- | src/script/bridge/qscriptfunction_p.h | 15 |
2 files changed, 17 insertions, 0 deletions
diff --git a/src/script/bridge/qscriptfunction.cpp b/src/script/bridge/qscriptfunction.cpp index 5b3de9e..1c8ea91 100644 --- a/src/script/bridge/qscriptfunction.cpp +++ b/src/script/bridge/qscriptfunction.cpp @@ -60,6 +60,8 @@ ASSERT_CLASS_FITS_IN_CELL(QScript::FunctionWithArgWrapper); namespace QScript { +const JSC::ClassInfo FunctionWrapper::info = { "QtNativeFunctionWrapper", &PrototypeFunction::info, 0, 0 }; +const JSC::ClassInfo FunctionWithArgWrapper::info = { "QtNativeFunctionWithArgWrapper", &PrototypeFunction::info, 0, 0 }; FunctionWrapper::FunctionWrapper(JSC::ExecState *exec, int length, const JSC::Identifier &name, QScriptEngine::FunctionSignature function) diff --git a/src/script/bridge/qscriptfunction_p.h b/src/script/bridge/qscriptfunction_p.h index 4901b72..6967274 100644 --- a/src/script/bridge/qscriptfunction_p.h +++ b/src/script/bridge/qscriptfunction_p.h @@ -79,6 +79,12 @@ public: QScriptEngine::FunctionSignature); ~FunctionWrapper(); + virtual const JSC::ClassInfo* classInfo() const { return &info; } + static const JSC::ClassInfo info; + + QScriptEngine::FunctionSignature function() const + { return data->function; } + private: virtual JSC::ConstructType getConstructData(JSC::ConstructData&); @@ -105,6 +111,15 @@ public: QScriptEngine::FunctionWithArgSignature, void *); ~FunctionWithArgWrapper(); + virtual const JSC::ClassInfo* classInfo() const { return &info; } + static const JSC::ClassInfo info; + + QScriptEngine::FunctionWithArgSignature function() const + { return data->function; } + + void *arg() const + { return data->arg; } + private: virtual JSC::ConstructType getConstructData(JSC::ConstructData&); |