Skip to content

Commit

Permalink
Merge pull request #37 from dinosaure/mirage+dune
Browse files Browse the repository at this point in the history
Compatibility with mirage+dune
  • Loading branch information
seliopou authored Sep 25, 2019
2 parents ee55233 + 542592d commit aaf92c5
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion bigstringaf.opam
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ build: [
depends: [
"dune" {build}
"alcotest" {with-test}
"base-bigarray"
"bigarray-compat"
"ocaml" {>= "4.03.0"}
]
depopts: [
Expand Down
6 changes: 3 additions & 3 deletions lib/bigstringaf.ml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
type bigstring =
(char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t
(char, Bigarray_compat.int8_unsigned_elt, Bigarray_compat.c_layout) Bigarray_compat.Array1.t

type t = bigstring

let create size = Bigarray.(Array1.create char c_layout size)
let create size = Bigarray_compat.(Array1.create char c_layout size)
let empty = create 0

module BA1 = Bigarray.Array1
module BA1 = Bigarray_compat.Array1

let length t = BA1.dim t

Expand Down
2 changes: 1 addition & 1 deletion lib/bigstringaf.mli
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
So here they are. Go crazy. *)

type t =
(char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t
(char, Bigarray_compat.int8_unsigned_elt, Bigarray_compat.c_layout) Bigarray_compat.Array1.t

(** {2 Constructors} *)

Expand Down
2 changes: 1 addition & 1 deletion lib/dune
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(library
(name bigstringaf)
(public_name bigstringaf)
(libraries bigarray)
(libraries bigarray-compat)
(flags (:standard -safe-string))

(c_names bigstringaf_stubs)
Expand Down
2 changes: 1 addition & 1 deletion lib/freestanding/dune
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
(name bigstringaf_freestanding)
(public_name bigstringaf.freestanding)
(optional)
(libraries bigarray ocaml-freestanding)
(libraries bigarray-compat ocaml-freestanding)
(c_names bigstringaf_stubs)
(c_flags (:include cflags.sexp)))

Expand Down
2 changes: 1 addition & 1 deletion lib/xen/dune
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
(name bigstringaf_xen)
(public_name bigstringaf.xen)
(optional)
(libraries bigarray mirage-xen-posix)
(libraries bigarray-compat mirage-xen-posix)
(c_names bigstringaf_stubs)
(c_flags (:include cflags.sexp)))

Expand Down

0 comments on commit aaf92c5

Please sign in to comment.