aboutsummaryrefslogtreecommitdiff
path: root/src/embind/emval.js
diff options
context:
space:
mode:
authorChad Austin <caustin@gmail.com>2014-03-23 13:28:44 -0700
committerChad Austin <chad@chadaustin.me>2014-03-28 23:56:40 -0700
commitbb34f6aaa0043e39d43b684f78099712b79026c2 (patch)
tree1a446e38ad31d6122490383c302bf5547e9932cd /src/embind/emval.js
parent6291f97039f94eb2eaeae7535a7dbe9c6ff8bbe5 (diff)
It appears we can use doubles as generic wire types.
Diffstat (limited to 'src/embind/emval.js')
-rw-r--r--src/embind/emval.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/embind/emval.js b/src/embind/emval.js
index 96d477c1..f0ca9b9b 100644
--- a/src/embind/emval.js
+++ b/src/embind/emval.js
@@ -187,16 +187,15 @@ function __emval_set_property(handle, key, value) {
_emval_handle_array[handle].value[_emval_handle_array[key].value] = _emval_handle_array[value].value;
}
-function __emval_as(handle, returnType, result, destructorsRef) {
+function __emval_as(handle, returnType, destructorsRef) {
requireHandle(handle);
returnType = requireRegisteredType(returnType, 'emval::as');
var destructors = [];
var rd = __emval_register(destructors);
HEAP32[destructorsRef >> 2] = rd;
- returnType.writeValueToPointer(
- _emval_handle_array[handle].value,
- result,
- destructors);
+ return returnType['toWireType'](
+ destructors,
+ _emval_handle_array[handle].value);
}
function parseParameters(argCount, argTypes, argWireTypes) {