diff --git a/js/dune b/js/dune deleted file mode 100644 index 589f6043..00000000 --- a/js/dune +++ /dev/null @@ -1,4 +0,0 @@ -(install - (section lib) - (files cstruct.js) - (package cstruct)) diff --git a/js/cstruct.js b/lib/cstruct.js similarity index 74% rename from js/cstruct.js rename to lib/cstruct.js index d7f0e415..e9e2ee49 100644 --- a/js/cstruct.js +++ b/lib/cstruct.js @@ -14,26 +14,6 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -//Provides: caml_blit_string_to_bigstring -//Requires: caml_ba_set_1, caml_string_unsafe_get -function caml_blit_string_to_bigstring(str, str_off, buf, buf_off, len) { - var i; - for (i = 0; i < len; i++) { - caml_ba_set_1(buf, buf_off + i, caml_string_unsafe_get(str, str_off + i)); - } - return 0; -} - -//Provides: caml_blit_bigstring_to_string -//Requires: caml_ba_get_1, caml_string_unsafe_set -function caml_blit_bigstring_to_string(buf, buf_off, str, str_off, len) { - var i; - for (i = 0; i < len; i++) { - caml_string_unsafe_set(str, str_off + i, caml_ba_get_1(buf, buf_off + i)); - } - return 0; -} - //Provides: caml_blit_bigstring_to_bigstring //Requires: caml_ba_get_1, caml_ba_set_1 function caml_blit_bigstring_to_bigstring(src, src_off, dst, dst_off, len) { diff --git a/lib/dune b/lib/dune index 8cd0a654..54b0d372 100644 --- a/lib/dune +++ b/lib/dune @@ -3,6 +3,7 @@ (public_name cstruct) (libraries bigarray) (c_names cstruct_stubs) + (js_of_ocaml (javascript_files cstruct.js)) (modules cstruct)) (library