Skip to content

Commit

Permalink
Merge pull request #241 from jonludlam/js_fixup
Browse files Browse the repository at this point in the history
Javascript packaging fixes
  • Loading branch information
avsm authored Mar 25, 2019
2 parents 19073c2 + b783a59 commit d0ad122
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 24 deletions.
4 changes: 0 additions & 4 deletions js/dune

This file was deleted.

20 changes: 0 additions & 20 deletions js/cstruct.js → lib/cstruct.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions lib/dune
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
(public_name cstruct)
(libraries bigarray)
(c_names cstruct_stubs)
(js_of_ocaml (javascript_files cstruct.js))
(modules cstruct))

(library
Expand Down

0 comments on commit d0ad122

Please sign in to comment.