diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/embind/emval.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/embind/emval.js b/src/embind/emval.js index 0fe6404e..1c1365ec 100644 --- a/src/embind/emval.js +++ b/src/embind/emval.js @@ -199,13 +199,15 @@ function __emval_as(handle, returnType, destructorsRef) { return returnType['toWireType'](destructors, handle); } -function __emval_call(handle, argCount, argTypes) { +function __emval_call(handle, argCount, argTypes, argv) { handle = requireHandle(handle); var types = lookupTypes(argCount, argTypes); var args = new Array(argCount); for (var i = 0; i < argCount; ++i) { - args[i] = types[i]['fromWireType'](arguments[3 + i]); + var type = types[i]; + args[i] = type['readValueFromVarArg'](argv); + argv += type.varArgAdvance; } var rv = handle.apply(undefined, args); |