My working unpac repository

update for jsoo#883

+6 -12
+6 -12
lib/runtime.js
··· 32 32 ----------------------------------------------------------------------------*/ 33 33 34 34 //Provides: bigstringaf_blit_to_bytes 35 - //Requires: caml_string_unsafe_set, caml_ba_get_1 35 + //Requires: caml_ba_blit_ba_to_bytes 36 36 function bigstringaf_blit_to_bytes(src, src_off, dst, dst_off, len) { 37 - for (var i = 0; i < len; i++) { 38 - caml_string_unsafe_set(dst, dst_off + i, caml_ba_get_1(src, src_off + i)); 39 - } 37 + return caml_ba_blit_ba_to_bytes(src,src_off,dst,dst_off,len); 40 38 } 41 39 42 40 //Provides: bigstringaf_blit_to_bigstring 43 - //Requires: caml_ba_set_1, caml_ba_get_1 41 + //Requires: caml_ba_blit_ba_to_ba 44 42 function bigstringaf_blit_to_bigstring(src, src_off, dst, dst_off, len) { 45 - for (var i = 0; i < len; i++) { 46 - caml_ba_set_1(dst, dst_off + i, caml_ba_get_1(src, src_off + i)); 47 - } 43 + return caml_ba_blit_ba_to_ba(src, src_off, dst, dst_off, len); 48 44 } 49 45 50 46 //Provides: bigstringaf_blit_from_bytes 51 - //Requires: caml_ba_set_1, caml_string_unsafe_get 47 + //Requires: caml_ba_blit_string_to_ba 52 48 function bigstringaf_blit_from_bytes(src, src_off, dst, dst_off, len) { 53 - for (var i = 0; i < len; i++) { 54 - caml_ba_set_1(dst, dst_off + i, caml_string_unsafe_get(src, src_off + i)); 55 - } 49 + return caml_ba_blit_string_to_ba(src, src_off, dst, dst_off, len); 56 50 } 57 51 58 52 //Provides: bigstringaf_memcmp_bigstring