You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the docs, this is supposed to work for both C and C++ in a .i file:
bool Init(int val=10);
The SWIG generation for JSCore and v8 fail to account for omitted arguments in this case, so in Javascript, calling
mymodule.Init();
will fail because it doesn't have exactly 1 argument.
The generated code has this check:
if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_Init.");
It needs to be more flexible to allow the default values to be assigned.
The text was updated successfully, but these errors were encountered:
According to the docs, this is supposed to work for both C and C++ in a .i file:
bool Init(int val=10);
The SWIG generation for JSCore and v8 fail to account for omitted arguments in this case, so in Javascript, calling
mymodule.Init();
will fail because it doesn't have exactly 1 argument.
The generated code has this check:
if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_Init.");
It needs to be more flexible to allow the default values to be assigned.
The text was updated successfully, but these errors were encountered: