Fix regressions of latest commits.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/oliverb-javascript-v8@13828 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Oliver Buchtala 2012-09-08 01:16:26 +00:00
commit 217ffb11d0
2 changed files with 28 additions and 17 deletions

View file

@ -11,13 +11,10 @@
JSObjectRef $jswrapper(JSContextRef context, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception)
{
$jslocals
if(argc != $jsargcount) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for $jswrapper.");
$jscode
return SWIG_JSC_NewPointerObj(context, result, SWIGTYPE_$jsmangledtype, SWIG_POINTER_OWN);
goto fail;
fail:
return NULL;
@ -63,6 +60,20 @@ JSObjectRef $jswrapper(JSContextRef context, JSObjectRef ctorObject,
}
%}
%fragment ("js_overloaded_ctor", "templates")
%{
JSObjectRef $jswrapper(JSContextRef context, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception)
{
$jslocals
$jscode
return SWIG_JSC_NewPointerObj(context, result, SWIGTYPE_$jsmangledtype, SWIG_POINTER_OWN);
goto fail;
fail:
return NULL;
}
%}
/* -----------------------------------------------------------------------------
* js_ctor_dispatch_case: template for a dispatch case for calling an overloaded ctor.
* - $jsargcount: number of arguments of called ctor