Skip to content

Commit

Permalink
update for jsoo#883
Browse files Browse the repository at this point in the history
  • Loading branch information
hhugo committed Oct 11, 2019
1 parent aaf92c5 commit 985e2ef
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions lib/runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,27 +32,21 @@
----------------------------------------------------------------------------*/

//Provides: bigstringaf_blit_to_bytes
//Requires: caml_string_unsafe_set, caml_ba_get_1
//Requires: caml_ba_blit_ba_to_bytes
function bigstringaf_blit_to_bytes(src, src_off, dst, dst_off, len) {
for (var i = 0; i < len; i++) {
caml_string_unsafe_set(dst, dst_off + i, caml_ba_get_1(src, src_off + i));
}
return caml_ba_blit_ba_to_bytes(src,src_off,dst,dst_off,len);
}

//Provides: bigstringaf_blit_to_bigstring
//Requires: caml_ba_set_1, caml_ba_get_1
//Requires: caml_ba_blit_ba_to_ba
function bigstringaf_blit_to_bigstring(src, src_off, dst, dst_off, len) {
for (var i = 0; i < len; i++) {
caml_ba_set_1(dst, dst_off + i, caml_ba_get_1(src, src_off + i));
}
return caml_ba_blit_ba_to_ba(src, src_off, dst, dst_off, len);
}

//Provides: bigstringaf_blit_from_bytes
//Requires: caml_ba_set_1, caml_string_unsafe_get
//Requires: caml_ba_blit_string_to_ba
function bigstringaf_blit_from_bytes(src, src_off, dst, dst_off, len) {
for (var i = 0; i < len; i++) {
caml_ba_set_1(dst, dst_off + i, caml_string_unsafe_get(src, src_off + i));
}
return caml_ba_blit_string_to_ba(src, src_off, dst, dst_off, len);
}

//Provides: bigstringaf_memcmp_bigstring
Expand Down

0 comments on commit 985e2ef

Please sign in to comment.