tangled
alpha
login
or
join now
anil.recoil.org
/
unpac-work
0
fork
atom
My working unpac repository
0
fork
atom
overview
issues
pulls
pipelines
update for jsoo#883
Hugo Heuzard
6 years ago
985e2ef8
aaf92c54
+6
-12
1 changed file
expand all
collapse all
unified
split
lib
runtime.js
+6
-12
lib/runtime.js
···
32
32
----------------------------------------------------------------------------*/
33
33
34
34
//Provides: bigstringaf_blit_to_bytes
35
35
-
//Requires: caml_string_unsafe_set, caml_ba_get_1
35
35
+
//Requires: caml_ba_blit_ba_to_bytes
36
36
function bigstringaf_blit_to_bytes(src, src_off, dst, dst_off, len) {
37
37
-
for (var i = 0; i < len; i++) {
38
38
-
caml_string_unsafe_set(dst, dst_off + i, caml_ba_get_1(src, src_off + i));
39
39
-
}
37
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
43
-
//Requires: caml_ba_set_1, caml_ba_get_1
41
41
+
//Requires: caml_ba_blit_ba_to_ba
44
42
function bigstringaf_blit_to_bigstring(src, src_off, dst, dst_off, len) {
45
45
-
for (var i = 0; i < len; i++) {
46
46
-
caml_ba_set_1(dst, dst_off + i, caml_ba_get_1(src, src_off + i));
47
47
-
}
43
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
51
-
//Requires: caml_ba_set_1, caml_string_unsafe_get
47
47
+
//Requires: caml_ba_blit_string_to_ba
52
48
function bigstringaf_blit_from_bytes(src, src_off, dst, dst_off, len) {
53
53
-
for (var i = 0; i < len; i++) {
54
54
-
caml_ba_set_1(dst, dst_off + i, caml_string_unsafe_get(src, src_off + i));
55
55
-
}
49
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