Fix v8 generator to use a non clashing name for built-in 'equals' method.
This commit is contained in:
parent
b6c9c97b96
commit
fc4d9b665c
2 changed files with 5 additions and 5 deletions
|
|
@ -25,7 +25,7 @@ v8::Handle<v8::FunctionTemplate> SWIGV8_CreateClassTemplate(const char* symbol)
|
||||||
inst_templ->SetInternalFieldCount(1);
|
inst_templ->SetInternalFieldCount(1);
|
||||||
|
|
||||||
v8::Handle<v8::ObjectTemplate> equals_templ = class_templ->PrototypeTemplate();
|
v8::Handle<v8::ObjectTemplate> equals_templ = class_templ->PrototypeTemplate();
|
||||||
equals_templ->Set(v8::String::NewSymbol("equals"), v8::FunctionTemplate::New(_wrap_equals));
|
equals_templ->Set(v8::String::NewSymbol("equals"), v8::FunctionTemplate::New(_SWIGV8_wrap_equals));
|
||||||
|
|
||||||
v8::Handle<v8::ObjectTemplate> cptr_templ = class_templ->PrototypeTemplate();
|
v8::Handle<v8::ObjectTemplate> cptr_templ = class_templ->PrototypeTemplate();
|
||||||
cptr_templ->Set(v8::String::NewSymbol("getCPtr"), v8::FunctionTemplate::New(_wrap_getCPtr));
|
cptr_templ->Set(v8::String::NewSymbol("getCPtr"), v8::FunctionTemplate::New(_wrap_getCPtr));
|
||||||
|
|
|
||||||
|
|
@ -297,9 +297,9 @@ v8::Handle<v8::Object> SWIG_V8_NewPointerObj(void *ptr, swig_type_info *info, in
|
||||||
#define SWIG_GetInstancePtr(obj, ptr) SWIG_V8_GetInstancePtr(obj, ptr)
|
#define SWIG_GetInstancePtr(obj, ptr) SWIG_V8_GetInstancePtr(obj, ptr)
|
||||||
|
|
||||||
#if (SWIG_V8_VERSION < 0x031900)
|
#if (SWIG_V8_VERSION < 0x031900)
|
||||||
v8::Handle<v8::Value> _wrap_equals(const v8::Arguments &args) {
|
v8::Handle<v8::Value> _SWIGV8_wrap_equals(const v8::Arguments &args) {
|
||||||
#else
|
#else
|
||||||
void _wrap_equals(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
void _SWIGV8_wrap_equals(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
||||||
#endif
|
#endif
|
||||||
v8::HandleScope scope;
|
v8::HandleScope scope;
|
||||||
v8::Handle<v8::Value> jsresult;
|
v8::Handle<v8::Value> jsresult;
|
||||||
|
|
@ -309,11 +309,11 @@ void _wrap_equals(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
||||||
int res1;
|
int res1;
|
||||||
int res2;
|
int res2;
|
||||||
|
|
||||||
if(args.Length() != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_equals.");
|
if(args.Length() != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for equals.");
|
||||||
|
|
||||||
res1 = SWIG_GetInstancePtr(args.Holder(), &arg1);
|
res1 = SWIG_GetInstancePtr(args.Holder(), &arg1);
|
||||||
if (!SWIG_IsOK(res1)) {
|
if (!SWIG_IsOK(res1)) {
|
||||||
SWIG_exception_fail(SWIG_ERROR, "Could not get pointer from 'this' object for _wrap_equals.");
|
SWIG_exception_fail(SWIG_ERROR, "Could not get pointer from 'this' object for equals.");
|
||||||
}
|
}
|
||||||
res2 = SWIG_GetInstancePtr(args[0], &arg2);
|
res2 = SWIG_GetInstancePtr(args[0], &arg2);
|
||||||
if (!SWIG_IsOK(res2)) {
|
if (!SWIG_IsOK(res2)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue