diff options
author | Chad Austin <caustin@gmail.com> | 2014-03-24 01:56:30 -0700 |
---|---|---|
committer | Chad Austin <chad@chadaustin.me> | 2014-03-28 23:56:41 -0700 |
commit | 8770323ba3a088c9b557344c18123650a6eef409 (patch) | |
tree | 054daefb98d8dc522defdd72f88540cff36ede98 /src | |
parent | 6e9b2e3c06eb9f98ecd5ed2dadc4dcce833b8343 (diff) |
Make val::operator() compatible with asm.js
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); |