Several adaptations and fixes on the way to get V8 emitter running.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/oliverb-javascript-v8@13788 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Oliver Buchtala 2012-09-08 01:05:37 +00:00
commit 78442b2764
6 changed files with 209 additions and 206 deletions

View file

@ -13,10 +13,6 @@ v8::Persistent<v8::FunctionTemplate> SWIGV8_CreateClassTemplate(const char* symb
return v8::Persistent<v8::FunctionTemplate>::New(class_templ);
}
v8::Handle<v8::ObjectTemplate> SWIGV8_CreateNamespace(const char* name, v8::Handle<v8::Context> parentContext) {
Handle<ObjectTemplate> namespace = ObjectTemplate::New();
}
/**
* Registers a class method with given name for a given class template.
*/
@ -29,7 +25,7 @@ void SWIGV8_AddMemberFunction(v8::Handle<v8::FunctionTemplate> class_templ, cons
* Registers a class method with given name for a given class template.
*/
void SWIGV8_AddGlobalFunction(v8::Handle<v8::ObjectTemplate> obj_templ, const char* symbol, v8::InvocationCallback _func) {
obj_templ->Set(String::NewSymbol(symbol), v8::FunctionTemplate::New(_func)->GetFunction());
obj_templ->Set(v8::String::NewSymbol(symbol), v8::FunctionTemplate::New(_func)->GetFunction());
}
/**
@ -44,6 +40,6 @@ void SWIGV8_AddMemberVariable(v8::Handle<v8::FunctionTemplate> class_templ, cons
* Registers a class method with given name for a given class template.
*/
void SWIGV8_AddGlobalVariable(v8::Handle<v8::ObjectTemplate> obj_templ, const char* symbol, v8::AccessorGetter getter, v8::AccessorSetter setter) {
obj_templ->SetAccessor(String::NewSymbol(symbol), getter, setter);
obj_templ->SetAccessor(v8::String::NewSymbol(symbol), getter, setter);
}
%} // v8_helper_functions