We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5e44f79 commit a32076dCopy full SHA for a32076d
src/xembind.cpp
@@ -52,12 +52,13 @@ namespace xeus
52
// if its a data view we can/need to get the byteLength directly
53
// because there is no "BYTES_PER_ELEMENT"
54
const unsigned length_uint8 = is_data_view ? js_array["byteLength"].as<unsigned>() : length * js_array["BYTES_PER_ELEMENT"].as<unsigned>() ;
55
+
56
57
// convert js typed-array into an Uint8Array
58
ems::val js_uint8array = ems::val::global("Uint8Array").new_(
59
js_array_buffer,
60
byteOffset,
- length * bytes_per_element
61
+ length_uint8
62
);
63
64
// resize array on c++ size
0 commit comments