diff --git a/crc.opam b/crc.opam index 7923009..c691ce2 100644 --- a/crc.opam +++ b/crc.opam @@ -1,15 +1,13 @@ opam-version: "2.0" name: "crc" +synopsis: "CRC implementation supporting strings and cstructs" +license: "ISC" +maintainer: "xapi-project maintainers" authors: [ "David Scott" "John Else" ] homepage: "https://github.com/xapi-project/ocaml-crc" bug-reports: "https://github.com/xapi-project/ocaml-crc/issues" -dev-repo: "git+https://github.com/xapi-project/ocaml-crc" -maintainer: "xen-api@lists.xen.org" -license: "ISC" -build: [[ "dune" "build" "-p" name ]] -run-test: [[ "dune" "runtest" "-p" name "-j" jobs ]] depends: [ - "dune" + "dune" {>= "1.4"} "ocaml" {>= "4.00.1"} "cstruct" {>= "1.0.1"} "ounit2" {with-test} @@ -17,7 +15,6 @@ depends: [ "ppx_deriving_rpc" "ppx_sexp_conv" {>= "v0.11.0"} ] -synopsis: "CRC implementation supporting strings and cstructs" -url { - src: "https://github.com/xapi-project/ocaml-crc/archive/master.tar.gz" -} +build: [[ "dune" "build" "-p" name ]] +run-test: [[ "dune" "runtest" "-p" name "-j" jobs ]] +dev-repo: "git+https://github.com/xapi-project/ocaml-crc" diff --git a/lib/crc_stubs.c b/lib/crc_stubs.c index d553e1f..60004d4 100644 --- a/lib/crc_stubs.c +++ b/lib/crc_stubs.c @@ -94,7 +94,7 @@ CAMLprim value crc32_cstruct( unsigned char* data; - data = (unsigned char*) Data_bigarray_val(buffer); + data = (unsigned char*) Caml_ba_data_val(buffer); data += Int_val(offset); result = caml_copy_int32(crc32(Int32_val(crc), data, Int_val(length)));