diff options
author | Chad Austin <chad@imvu.com> | 2013-04-15 21:29:01 -0700 |
---|---|---|
committer | Jukka Jylänki <jujjyl@gmail.com> | 2013-04-18 20:08:14 +0300 |
commit | d2e6efdf4821ff1e9f16fc4884d398619c0d7a06 (patch) | |
tree | 1df7e4f5a824078df779381714085a2adacf5121 /src/embind | |
parent | e53dd06bf9ca763a65f8bc77dd3ae980843e8652 (diff) |
can pass ArrayBuffer to std::string
Diffstat (limited to 'src/embind')
-rwxr-xr-x | src/embind/embind.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/embind/embind.js b/src/embind/embind.js index 078b5c1c..bd13087d 100755 --- a/src/embind/embind.js +++ b/src/embind/embind.js @@ -348,6 +348,10 @@ function __embind_register_std_string(rawType, name) { return a.join(''); }, toWireType: function(destructors, value) { + if (value instanceof ArrayBuffer) { + value = new Uint8Array(value); + } + function getTAElement(ta, index) { return ta[index]; } |