From fc4d9b665c5839df06501e736163bfeadb7503d1 Mon Sep 17 00:00:00 2001 From: Oliver Buchtala Date: Mon, 9 Sep 2013 16:28:29 +0300 Subject: [PATCH] Fix v8 generator to use a non clashing name for built-in 'equals' method. --- Lib/javascript/v8/javascripthelpers.swg | 2 +- Lib/javascript/v8/javascriptruntime.swg | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Lib/javascript/v8/javascripthelpers.swg b/Lib/javascript/v8/javascripthelpers.swg index 52f3f106f..8da6627e2 100644 --- a/Lib/javascript/v8/javascripthelpers.swg +++ b/Lib/javascript/v8/javascripthelpers.swg @@ -25,7 +25,7 @@ v8::Handle SWIGV8_CreateClassTemplate(const char* symbol) inst_templ->SetInternalFieldCount(1); v8::Handle 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 cptr_templ = class_templ->PrototypeTemplate(); cptr_templ->Set(v8::String::NewSymbol("getCPtr"), v8::FunctionTemplate::New(_wrap_getCPtr)); diff --git a/Lib/javascript/v8/javascriptruntime.swg b/Lib/javascript/v8/javascriptruntime.swg index 31ce84a04..c34b62108 100644 --- a/Lib/javascript/v8/javascriptruntime.swg +++ b/Lib/javascript/v8/javascriptruntime.swg @@ -297,9 +297,9 @@ v8::Handle SWIG_V8_NewPointerObj(void *ptr, swig_type_info *info, in #define SWIG_GetInstancePtr(obj, ptr) SWIG_V8_GetInstancePtr(obj, ptr) #if (SWIG_V8_VERSION < 0x031900) -v8::Handle _wrap_equals(const v8::Arguments &args) { +v8::Handle _SWIGV8_wrap_equals(const v8::Arguments &args) { #else -void _wrap_equals(const v8::FunctionCallbackInfo& args) { +void _SWIGV8_wrap_equals(const v8::FunctionCallbackInfo& args) { #endif v8::HandleScope scope; v8::Handle jsresult; @@ -309,11 +309,11 @@ void _wrap_equals(const v8::FunctionCallbackInfo& args) { int res1; 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); 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); if (!SWIG_IsOK(res2)) {