From 06c3247c2e8770ca5cd2c6dbe9f6fbb210c496bb Mon Sep 17 00:00:00 2001 From: Calascibetta Romain Date: Fri, 6 Nov 2020 14:10:36 +0100 Subject: [PATCH 1/5] Use Bigarray_compat module instead of Bigarray --- src/ctypes/ctypes.mli | 22 +++++++++--------- src/ctypes/ctypes_bigarray.ml | 16 ++++++------- src/ctypes/ctypes_bigarray.mli | 18 +++++++-------- src/ctypes/ctypes_bigarray_stubs.ml | 36 ++++++++++++++--------------- src/ctypes/ctypes_memory.ml | 2 +- src/ctypes/ctypes_static.ml | 14 +++++------ src/ctypes/ctypes_static.mli | 16 ++++++------- src/ctypes/ctypes_types.mli | 14 +++++------ 8 files changed, 69 insertions(+), 69 deletions(-) diff --git a/src/ctypes/ctypes.mli b/src/ctypes/ctypes.mli index 94a8a15f3..449c37d3b 100644 --- a/src/ctypes/ctypes.mli +++ b/src/ctypes/ctypes.mli @@ -48,7 +48,7 @@ val genarray : < element: 'a; layout: 'l; ba_repr: 'b; - bigarray: ('a, 'b, 'l) Bigarray.Genarray.t; + bigarray: ('a, 'b, 'l) Bigarray_compat.Genarray.t; carray: 'a carray; dims: int array > bigarray_class (** The class of {!Bigarray.Genarray.t} values *) @@ -57,7 +57,7 @@ val array1 : < element: 'a; layout: 'l; ba_repr: 'b; - bigarray: ('a, 'b, 'l) Bigarray.Array1.t; + bigarray: ('a, 'b, 'l) Bigarray_compat.Array1.t; carray: 'a carray; dims: int > bigarray_class (** The class of {!Bigarray.Array1.t} values *) @@ -66,7 +66,7 @@ val array2 : < element: 'a; layout: 'l; ba_repr: 'b; - bigarray: ('a, 'b, 'l) Bigarray.Array2.t; + bigarray: ('a, 'b, 'l) Bigarray_compat.Array2.t; carray: 'a carray carray; dims: int * int > bigarray_class (** The class of {!Bigarray.Array2.t} values *) @@ -75,7 +75,7 @@ val array3 : < element: 'a; layout: 'l; ba_repr: 'b; - bigarray: ('a, 'b, 'l) Bigarray.Array3.t; + bigarray: ('a, 'b, 'l) Bigarray_compat.Array3.t; carray: 'a carray carray carray; dims: int * int * int > bigarray_class (** The class of {!Bigarray.Array3.t} values *) @@ -354,29 +354,29 @@ val bigarray_start : < element: 'a; (** Return the address of the first element of the given Bigarray value. *) val bigarray_of_ptr : < element: 'a; - layout: Bigarray.c_layout; + layout: Bigarray_compat.c_layout; ba_repr: 'f; bigarray: 'b; carray: _; dims: 'i > bigarray_class -> - 'i -> ('a, 'f) Bigarray.kind -> 'a ptr -> 'b + 'i -> ('a, 'f) Bigarray_compat.kind -> 'a ptr -> 'b (** [bigarray_of_ptr c dims k p] converts the C pointer [p] to a C-layout bigarray value. No copy is made; the bigarray references the memory pointed to by [p]. *) val fortran_bigarray_of_ptr : < element: 'a; - layout: Bigarray.fortran_layout; + layout: Bigarray_compat.fortran_layout; ba_repr: 'f; bigarray: 'b; carray: _; dims: 'i > bigarray_class -> - 'i -> ('a, 'f) Bigarray.kind -> 'a ptr -> 'b + 'i -> ('a, 'f) Bigarray_compat.kind -> 'a ptr -> 'b (** [fortran_bigarray_of_ptr c dims k p] converts the C pointer [p] to a Fortran-layout bigarray value. No copy is made; the bigarray references the memory pointed to by [p]. *) val array_of_bigarray : < element: _; - layout: Bigarray.c_layout; + layout: Bigarray_compat.c_layout; ba_repr: _; bigarray: 'b; carray: 'c; @@ -388,12 +388,12 @@ val array_of_bigarray : < element: _; (** Convert a Bigarray value to a C array. *) val bigarray_of_array : < element: 'a; - layout: Bigarray.c_layout; + layout: Bigarray_compat.c_layout; ba_repr: 'f; bigarray: 'b; carray: 'c carray; dims: 'i > bigarray_class -> - ('a, 'f) Bigarray.kind -> 'c carray -> 'b + ('a, 'f) Bigarray_compat.kind -> 'c carray -> 'b (** [bigarray_of_array c k a] converts the {!CArray.t} value [a] to a C-layout bigarray value. No copy is made; the result occupies the same memory as [a]. *) diff --git a/src/ctypes/ctypes_bigarray.ml b/src/ctypes/ctypes_bigarray.ml index 43ff13260..b7d687f5e 100644 --- a/src/ctypes/ctypes_bigarray.ml +++ b/src/ctypes/ctypes_bigarray.ml @@ -28,12 +28,12 @@ let bigarray_kind_sizeof k = Ctypes_primitives.sizeof (prim_of_kind k) let bigarray_kind_alignment k = Ctypes_primitives.alignment (prim_of_kind k) type (_, _, _) dims = -| DimsGen : int array -> ('a, ('a, _, 'l) Bigarray.Genarray.t, 'l) dims -| Dims1 : int -> ('a, ('a, _, 'l) Bigarray.Array1.t, 'l) dims -| Dims2 : int * int -> ('a, ('a, _, 'l) Bigarray.Array2.t, 'l) dims -| Dims3 : int * int * int -> ('a, ('a, _, 'l) Bigarray.Array3.t, 'l) dims +| DimsGen : int array -> ('a, ('a, _, 'l) Bigarray_compat.Genarray.t, 'l) dims +| Dims1 : int -> ('a, ('a, _, 'l) Bigarray_compat.Array1.t, 'l) dims +| Dims2 : int * int -> ('a, ('a, _, 'l) Bigarray_compat.Array2.t, 'l) dims +| Dims3 : int * int * int -> ('a, ('a, _, 'l) Bigarray_compat.Array3.t, 'l) dims -type ('a, 'b, 'l) t = ('a, 'b, 'l) dims * 'a kind * 'l Bigarray.layout +type ('a, 'b, 'l) t = ('a, 'b, 'l) dims * 'a kind * 'l Bigarray_compat.layout let elements : type a b l. (b, a, l) dims -> int = function | DimsGen ds -> Array.fold_left ( * ) 1 ds @@ -105,10 +105,10 @@ let kind_type_names : type a. a kind -> _ = function (`Ident ["char"], `Ident ["Bigarray"; "int8_unsigned_elt"]) -let layout_path : type a. a Bigarray.layout -> string list = +let layout_path : type a. a Bigarray_compat.layout -> string list = function - | Bigarray.C_layout -> ["Bigarray"; "c_layout"] - | Bigarray.Fortran_layout -> ["Bigarray"; "fortran_layout"] + | Bigarray_compat.C_layout -> ["Bigarray"; "c_layout"] + | Bigarray_compat.Fortran_layout -> ["Bigarray"; "fortran_layout"] let type_expression : type a b l. (a, b, l) t -> _ = fun (t, ck, l) -> diff --git a/src/ctypes/ctypes_bigarray.mli b/src/ctypes/ctypes_bigarray.mli index ddad6f000..7c3bb99bb 100644 --- a/src/ctypes/ctypes_bigarray.mli +++ b/src/ctypes/ctypes_bigarray.mli @@ -13,23 +13,23 @@ type ('a, 'b, 'l) t (** {3 Type constructors} *) -val bigarray : int array -> ('a, 'b) Bigarray.kind -> 'l Bigarray.layout -> - ('a, ('a, 'b, 'l) Bigarray.Genarray.t, 'l) t +val bigarray : int array -> ('a, 'b) Bigarray_compat.kind -> 'l Bigarray_compat.layout -> + ('a, ('a, 'b, 'l) Bigarray_compat.Genarray.t, 'l) t (** Create a {!t} value for the {!Bigarray.Genarray.t} type. *) -val bigarray1 : int -> ('a, 'b) Bigarray.kind -> 'l Bigarray.layout -> - ('a, ('a, 'b, 'l) Bigarray.Array1.t, 'l) t +val bigarray1 : int -> ('a, 'b) Bigarray_compat.kind -> 'l Bigarray_compat.layout -> + ('a, ('a, 'b, 'l) Bigarray_compat.Array1.t, 'l) t (** Create a {!t} value for the {!Bigarray.Array1.t} type. *) -val bigarray2 : int -> int -> ('a, 'b) Bigarray.kind -> 'l Bigarray.layout -> - ('a, ('a, 'b, 'l) Bigarray.Array2.t, 'l) t +val bigarray2 : int -> int -> ('a, 'b) Bigarray_compat.kind -> 'l Bigarray_compat.layout -> + ('a, ('a, 'b, 'l) Bigarray_compat.Array2.t, 'l) t (** Create a {!t} value for the {!Bigarray.Array2.t} type. *) -val bigarray3 : int -> int -> int -> ('a, 'b) Bigarray.kind -> 'l Bigarray.layout -> - ('a, ('a, 'b, 'l) Bigarray.Array3.t, 'l) t +val bigarray3 : int -> int -> int -> ('a, 'b) Bigarray_compat.kind -> 'l Bigarray_compat.layout -> + ('a, ('a, 'b, 'l) Bigarray_compat.Array3.t, 'l) t (** Create a {!t} value for the {!Bigarray.Array3.t} type. *) -val prim_of_kind : ('a, _) Bigarray.kind -> 'a Ctypes_primitive_types.prim +val prim_of_kind : ('a, _) Bigarray_compat.kind -> 'a Ctypes_primitive_types.prim (** Create a {!Ctypes_ptr.Types.ctype} for a {!Bigarray.kind}. *) (** {3 Type eliminators} *) diff --git a/src/ctypes/ctypes_bigarray_stubs.ml b/src/ctypes/ctypes_bigarray_stubs.ml index cf16b3934..72e679e09 100644 --- a/src/ctypes/ctypes_bigarray_stubs.ml +++ b/src/ctypes/ctypes_bigarray_stubs.ml @@ -20,36 +20,36 @@ type _ kind = | Kind_complex64 : Complex.t kind | Kind_char : char kind -let kind : type a b. (a, b) Bigarray.kind -> a kind = function - | Bigarray.Float32 -> Kind_float32 - | Bigarray.Float64 -> Kind_float64 - | Bigarray.Int8_signed -> Kind_int8_signed - | Bigarray.Int8_unsigned -> Kind_int8_unsigned - | Bigarray.Int16_signed -> Kind_int16_signed - | Bigarray.Int16_unsigned -> Kind_int16_unsigned - | Bigarray.Int32 -> Kind_int32 - | Bigarray.Int64 -> Kind_int64 - | Bigarray.Int -> Kind_int - | Bigarray.Nativeint -> Kind_nativeint - | Bigarray.Complex32 -> Kind_complex32 - | Bigarray.Complex64 -> Kind_complex64 - | Bigarray.Char -> Kind_char +let kind : type a b. (a, b) Bigarray_compat.kind -> a kind = function + | Bigarray_compat.Float32 -> Kind_float32 + | Bigarray_compat.Float64 -> Kind_float64 + | Bigarray_compat.Int8_signed -> Kind_int8_signed + | Bigarray_compat.Int8_unsigned -> Kind_int8_unsigned + | Bigarray_compat.Int16_signed -> Kind_int16_signed + | Bigarray_compat.Int16_unsigned -> Kind_int16_unsigned + | Bigarray_compat.Int32 -> Kind_int32 + | Bigarray_compat.Int64 -> Kind_int64 + | Bigarray_compat.Int -> Kind_int + | Bigarray_compat.Nativeint -> Kind_nativeint + | Bigarray_compat.Complex32 -> Kind_complex32 + | Bigarray_compat.Complex64 -> Kind_complex64 + | Bigarray_compat.Char -> Kind_char external address : 'b -> Ctypes_ptr.voidp = "ctypes_bigarray_address" external view : 'a kind -> dims:int array -> _ Ctypes_ptr.Fat.t -> - 'l Bigarray.layout -> ('a, 'b, 'l) Bigarray.Genarray.t + 'l Bigarray_compat.layout -> ('a, 'b, 'l) Bigarray_compat.Genarray.t = "ctypes_bigarray_view" external view1 : 'a kind -> dims:int array -> _ Ctypes_ptr.Fat.t -> - 'l Bigarray.layout -> ('a, 'b, 'l) Bigarray.Array1.t + 'l Bigarray_compat.layout -> ('a, 'b, 'l) Bigarray_compat.Array1.t = "ctypes_bigarray_view" external view2 : 'a kind -> dims:int array -> _ Ctypes_ptr.Fat.t -> - 'l Bigarray.layout -> ('a, 'b, 'l) Bigarray.Array2.t + 'l Bigarray_compat.layout -> ('a, 'b, 'l) Bigarray_compat.Array2.t = "ctypes_bigarray_view" external view3 : 'a kind -> dims:int array -> _ Ctypes_ptr.Fat.t -> - 'l Bigarray.layout -> ('a, 'b, 'l) Bigarray.Array3.t + 'l Bigarray_compat.layout -> ('a, 'b, 'l) Bigarray_compat.Array3.t = "ctypes_bigarray_view" diff --git a/src/ctypes/ctypes_memory.ml b/src/ctypes/ctypes_memory.ml index 81febabc4..33f686b8d 100644 --- a/src/ctypes/ctypes_memory.ml +++ b/src/ctypes/ctypes_memory.ml @@ -289,7 +289,7 @@ let getf s field = !@(s @. field) let addr { structured } = structured -open Bigarray +open Bigarray_compat let _bigarray_start kind ba = let raw_address = Ctypes_bigarray.unsafe_address ba in diff --git a/src/ctypes/ctypes_static.ml b/src/ctypes/ctypes_static.ml index b86e6e458..f54da467c 100644 --- a/src/ctypes/ctypes_static.ml +++ b/src/ctypes/ctypes_static.ml @@ -92,28 +92,28 @@ type _ bigarray_class = layout: 'l; dims: int array; ba_repr: 'b; - bigarray: ('a, 'b, 'l) Bigarray.Genarray.t; + bigarray: ('a, 'b, 'l) Bigarray_compat.Genarray.t; carray: 'a carray > bigarray_class | Array1 : < element: 'a; layout: 'l; dims: int; ba_repr: 'b; - bigarray: ('a, 'b, 'l) Bigarray.Array1.t; + bigarray: ('a, 'b, 'l) Bigarray_compat.Array1.t; carray: 'a carray > bigarray_class | Array2 : < element: 'a; layout: 'l; dims: int * int; ba_repr: 'b; - bigarray: ('a, 'b, 'l) Bigarray.Array2.t; + bigarray: ('a, 'b, 'l) Bigarray_compat.Array2.t; carray: 'a carray carray > bigarray_class | Array3 : < element: 'a; layout: 'l; dims: int * int * int; ba_repr: 'b; - bigarray: ('a, 'b, 'l) Bigarray.Array3.t; + bigarray: ('a, 'b, 'l) Bigarray_compat.Array3.t; carray: 'a carray carray carray > bigarray_class type boxed_typ = BoxedType : 'a typ -> boxed_typ @@ -244,7 +244,7 @@ let bigarray_ : type a b c d e l. ba_repr: c; bigarray: d; carray: e > bigarray_class -> - b -> (a, c) Bigarray.kind -> l Bigarray.layout -> d typ = + b -> (a, c) Bigarray_compat.kind -> l Bigarray_compat.layout -> d typ = fun spec dims kind l -> match spec with | Genarray -> Bigarray (Ctypes_bigarray.bigarray dims kind l) | Array1 -> Bigarray (Ctypes_bigarray.bigarray1 dims kind l) @@ -253,8 +253,8 @@ let bigarray_ : type a b c d e l. | Array3 -> let d1, d2, d3 = dims in Bigarray (Ctypes_bigarray.bigarray3 d1 d2 d3 kind l) -let bigarray spec c k = bigarray_ spec c k Bigarray.c_layout -let fortran_bigarray spec c k = bigarray_ spec c k Bigarray.fortran_layout +let bigarray spec c k = bigarray_ spec c k Bigarray_compat.c_layout +let fortran_bigarray spec c k = bigarray_ spec c k Bigarray_compat.fortran_layout let returning v = if not (passable v) then diff --git a/src/ctypes/ctypes_static.mli b/src/ctypes/ctypes_static.mli index 5824af24d..c8c91ff18 100644 --- a/src/ctypes/ctypes_static.mli +++ b/src/ctypes/ctypes_static.mli @@ -84,28 +84,28 @@ type _ bigarray_class = layout: 'l; dims: int array; ba_repr: 'b; - bigarray: ('a, 'b, 'l) Bigarray.Genarray.t; + bigarray: ('a, 'b, 'l) Bigarray_compat.Genarray.t; carray: 'a carray > bigarray_class | Array1 : < element: 'a; layout: 'l; dims: int; ba_repr: 'b; - bigarray: ('a, 'b, 'l) Bigarray.Array1.t; + bigarray: ('a, 'b, 'l) Bigarray_compat.Array1.t; carray: 'a carray > bigarray_class | Array2 : < element: 'a; layout: 'l; dims: int * int; ba_repr: 'b; - bigarray: ('a, 'b, 'l) Bigarray.Array2.t; + bigarray: ('a, 'b, 'l) Bigarray_compat.Array2.t; carray: 'a carray carray > bigarray_class | Array3 : < element: 'a; layout: 'l; dims: int * int * int; ba_repr: 'b; - bigarray: ('a, 'b, 'l) Bigarray.Array3.t; + bigarray: ('a, 'b, 'l) Bigarray_compat.Array3.t; carray: 'a carray carray carray > bigarray_class type boxed_typ = BoxedType : 'a typ -> boxed_typ @@ -163,16 +163,16 @@ val bigarray : < ba_repr : 'c; bigarray : 'd; carray : 'e; dims : 'b; - layout: Bigarray.c_layout; + layout: Bigarray_compat.c_layout; element : 'a > bigarray_class -> - 'b -> ('a, 'c) Bigarray.kind -> 'd typ + 'b -> ('a, 'c) Bigarray_compat.kind -> 'd typ val fortran_bigarray : < ba_repr : 'c; bigarray : 'd; carray : 'e; dims : 'b; - layout: Bigarray.fortran_layout; + layout: Bigarray_compat.fortran_layout; element : 'a > bigarray_class -> - 'b -> ('a, 'c) Bigarray.kind -> 'd typ + 'b -> ('a, 'c) Bigarray_compat.kind -> 'd typ val returning : 'a typ -> 'a fn val static_funptr : 'a fn -> 'a static_funptr typ val structure : string -> 'a structure typ diff --git a/src/ctypes/ctypes_types.mli b/src/ctypes/ctypes_types.mli index 149726aac..90879dd32 100644 --- a/src/ctypes/ctypes_types.mli +++ b/src/ctypes/ctypes_types.mli @@ -224,27 +224,27 @@ sig val bigarray : < element: 'a; - layout: Bigarray.c_layout; + layout: Bigarray_compat.c_layout; ba_repr: 'b; dims: 'dims; bigarray: 'bigarray; carray: _ > Ctypes_static.bigarray_class -> - 'dims -> ('a, 'b) Bigarray.kind -> 'bigarray typ + 'dims -> ('a, 'b) Bigarray_compat.kind -> 'bigarray typ (** Construct a sized C-layout bigarray type representation from a bigarray - class, the dimensions, and the {!Bigarray.kind}. *) + class, the dimensions, and the {!Bigarray_compat.kind}. *) val fortran_bigarray : < element: 'a; - layout: Bigarray.fortran_layout; + layout: Bigarray_compat.fortran_layout; ba_repr: 'b; dims: 'dims; bigarray: 'bigarray; carray: _ > Ctypes_static.bigarray_class -> - 'dims -> ('a, 'b) Bigarray.kind -> 'bigarray typ + 'dims -> ('a, 'b) Bigarray_compat.kind -> 'bigarray typ (** Construct a sized Fortran-layout bigarray type representation from a - bigarray class, the dimensions, and the {!Bigarray.kind}. *) + bigarray class, the dimensions, and the {!Bigarray_compat.kind}. *) - val typ_of_bigarray_kind : ('a, 'b) Bigarray.kind -> 'a typ + val typ_of_bigarray_kind : ('a, 'b) Bigarray_compat.kind -> 'a typ (** [typ_of_bigarray_kind k] is the type corresponding to the Bigarray kind [k]. *) From 7d90acacf6fa9683c755016666e031cbaa8e70a5 Mon Sep 17 00:00:00 2001 From: Calascibetta Romain Date: Fri, 6 Nov 2020 14:11:07 +0100 Subject: [PATCH 2/5] Compilation depends on bigarray-compat instead bigarray library --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4ddab7a36..7457b4c76 100644 --- a/Makefile +++ b/Makefile @@ -66,7 +66,7 @@ ctypes.cmi_only = ctypes_static ctypes_primitive_types ctypes_structs cstubs_int ctypes.public = lDouble complexL ctypes posixTypes ctypes_types ctypes.dir = src/ctypes ctypes.extra_mls = ctypes_primitives.ml -ctypes.deps = bigarray integers +ctypes.deps = bigarray-compat integers ctypes.linkdeps = integers_stubs ctypes.install = yes ctypes.install_native_objects = yes From 4be3afd8a41579954413b4907f229702c56e2496 Mon Sep 17 00:00:00 2001 From: Calascibetta Romain Date: Fri, 6 Nov 2020 14:11:30 +0100 Subject: [PATCH 3/5] Update OPAM and META file according the replacement of bigarray by bigarray-compat --- META | 2 +- ctypes.opam | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/META b/META index 3162265a7..5dc55094c 100644 --- a/META +++ b/META @@ -1,6 +1,6 @@ version = "0.17.1" description = "Combinators for binding to C libraries without writing any C." -requires = "bigarray bytes integers" +requires = "bigarray-compat bytes integers" archive(byte) = "ctypes.cma" archive(byte, plugin) = "ctypes.cma" archive(byte, toploop) = "ctypes.cma ctypes-top.cma" diff --git a/ctypes.opam b/ctypes.opam index 6a8f1ed0a..060904c3b 100644 --- a/ctypes.opam +++ b/ctypes.opam @@ -27,6 +27,7 @@ depends: [ "ctypes-foreign" {with-test} "ounit" {with-test} "conf-ncurses" {with-test} + "bigarray-compat" ] depopts: [ "ctypes-foreign" From 1f05ada686fa2f97dbc503f5bb24f9d312b3eb75 Mon Sep 17 00:00:00 2001 From: Calascibetta Romain Date: Fri, 6 Nov 2020 14:39:50 +0100 Subject: [PATCH 4/5] Update tests to use bigarray-compat package instead of bigarray --- Makefile.tests | 153 +++++++++--------- tests/test-alignment/test_alignment.ml | 4 +- tests/test-bigarrays/test_bigarrays.ml | 54 +++---- tests/test-coercions/test_coercions.ml | 32 ++-- tests/test-foreign_values/stubs/functions.ml | 2 +- .../test_foreign_values.ml | 4 +- tests/test-lwt-jobs/test_lwt_jobs.ml | 2 +- tests/test-lwt-preemptive/test_lwt_jobs.ml | 2 +- tests/test-passable/test_passable.ml | 16 +- tests/test-sizeof/test_sizeof.ml | 4 +- .../test-type_printing/test_type_printing.ml | 24 +-- 11 files changed, 149 insertions(+), 148 deletions(-) diff --git a/Makefile.tests b/Makefile.tests index 3ebff900a..9ae9adf68 100644 --- a/Makefile.tests +++ b/Makefile.tests @@ -19,7 +19,7 @@ tests-common: $$(LIB_TARGETS) test-raw.dir = tests/test-raw test-raw.threads = yes -test-raw.deps = bigarray oUnit str integers +test-raw.deps = bigarray-compat oUnit str integers test-raw.subproject_deps = ctypes ctypes-foreign test-raw: PROJECT=test-raw test-raw: $$(BEST_TARGET) @@ -35,13 +35,13 @@ test-pointers-stub-generator.dir = tests/test-pointers/stub-generator test-pointers-stub-generator.threads = yes test-pointers-stub-generator.subproject_deps = ctypes cstubs \ ctypes-foreign test-pointers-stubs tests-common -test-pointers-stub-generator.deps = str bigarray integers +test-pointers-stub-generator.deps = str bigarray-compat integers test-pointers-stub-generator: PROJECT=test-pointers-stub-generator test-pointers-stub-generator: $$(BEST_TARGET) test-pointers.dir = tests/test-pointers test-pointers.threads = yes -test-pointers.deps = str bigarray oUnit integers +test-pointers.deps = str bigarray-compat oUnit integers test-pointers.subproject_deps = ctypes ctypes-foreign \ cstubs tests-common test-pointers-stubs test-pointers.link_flags = -L$(BUILDDIR)/clib -ltest_functions @@ -70,13 +70,13 @@ test-integers-stub-generator.dir = tests/test-integers/stub-generator test-integers-stub-generator.threads = yes test-integers-stub-generator.subproject_deps = ctypes cstubs \ ctypes-foreign test-integers-stubs tests-common -test-integers-stub-generator.deps = str bigarray integers +test-integers-stub-generator.deps = str bigarray-compat integers test-integers-stub-generator: PROJECT=test-integers-stub-generator test-integers-stub-generator: $$(BEST_TARGET) test-integers.dir = tests/test-integers test-integers.threads = yes -test-integers.deps = str bigarray oUnit integers +test-integers.deps = str bigarray-compat oUnit integers test-integers.subproject_deps = ctypes ctypes-foreign \ cstubs tests-common test-integers-stubs test-integers.link_flags = -L$(BUILDDIR)/clib -ltest_functions @@ -106,13 +106,13 @@ test-variadic-stub-generator.dir = tests/test-variadic/stub-generator test-variadic-stub-generator.threads = yes test-variadic-stub-generator.subproject_deps = ctypes cstubs \ ctypes-foreign test-variadic-stubs tests-common -test-variadic-stub-generator.deps = str bigarray integers +test-variadic-stub-generator.deps = str bigarray-compat integers test-variadic-stub-generator: PROJECT=test-variadic-stub-generator test-variadic-stub-generator: $$(BEST_TARGET) test-variadic.dir = tests/test-variadic test-variadic.threads = yes -test-variadic.deps = str bigarray oUnit integers +test-variadic.deps = str bigarray-compat oUnit integers test-variadic.subproject_deps = ctypes ctypes-foreign \ cstubs tests-common test-variadic-stubs test-variadic.link_flags = -L$(BUILDDIR)/clib -ltest_functions @@ -141,13 +141,13 @@ test-builtins-stub-generator.dir = tests/test-builtins/stub-generator test-builtins-stub-generator.threads = yes test-builtins-stub-generator.subproject_deps = ctypes cstubs \ test-builtins-stubs ctypes-foreign tests-common -test-builtins-stub-generator.deps = str bigarray integers +test-builtins-stub-generator.deps = str bigarray-compat integers test-builtins-stub-generator: PROJECT=test-builtins-stub-generator test-builtins-stub-generator: $$(BEST_TARGET) test-builtins.dir = tests/test-builtins test-builtins.threads = yes -test-builtins.deps = str bigarray oUnit integers +test-builtins.deps = str bigarray-compat oUnit integers test-builtins.subproject_deps = ctypes cstubs test-builtins-stubs \ ctypes-foreign tests-common test-builtins.link_flags = -L$(BUILDDIR)/clib -ltest_functions @@ -176,13 +176,13 @@ test-macros-stub-generator.dir = tests/test-macros/stub-generator test-macros-stub-generator.threads = yes test-macros-stub-generator.subproject_deps = ctypes cstubs \ test-macros-stubs ctypes-foreign tests-common -test-macros-stub-generator.deps = str bigarray integers +test-macros-stub-generator.deps = str bigarray-compat integers test-macros-stub-generator: PROJECT=test-macros-stub-generator test-macros-stub-generator: $$(BEST_TARGET) test-macros.dir = tests/test-macros test-macros.threads = yes -test-macros.deps = str bigarray oUnit integers +test-macros.deps = str bigarray-compat oUnit integers test-macros.subproject_deps = ctypes cstubs test-macros-stubs \ ctypes-foreign tests-common test-macros.link_flags = -L$(BUILDDIR)/clib -ltest_functions @@ -212,13 +212,13 @@ test-higher_order-stub-generator.dir = tests/test-higher_order/stub-generator test-higher_order-stub-generator.threads = yes test-higher_order-stub-generator.subproject_deps = ctypes cstubs \ ctypes-foreign test-higher_order-stubs tests-common -test-higher_order-stub-generator.deps = str bigarray integers +test-higher_order-stub-generator.deps = str bigarray-compat integers test-higher_order-stub-generator: PROJECT=test-higher_order-stub-generator test-higher_order-stub-generator: $$(BEST_TARGET) test-higher_order.dir = tests/test-higher_order test-higher_order.threads = yes -test-higher_order.deps = str bigarray oUnit integers +test-higher_order.deps = str bigarray-compat oUnit integers test-higher_order.subproject_deps = ctypes ctypes-foreign \ cstubs test-higher_order-stubs tests-common test-higher_order.link_flags = -L$(BUILDDIR)/clib -ltest_functions @@ -258,7 +258,7 @@ test-enums-stub-generator.threads = yes test-enums-stub-generator.subproject_deps = ctypes cstubs \ test-enums-struct-stubs \ ctypes-foreign test-enums-stubs tests-common -test-enums-stub-generator.deps = str bigarray integers +test-enums-stub-generator.deps = str bigarray-compat integers test-enums-stub-generator: PROJECT=test-enums-stub-generator test-enums-stub-generator: $$(BEST_TARGET) @@ -266,13 +266,13 @@ test-enums-struct-stub-generator.dir = tests/test-enums/struct-stub-generator test-enums-struct-stub-generator.threads = yes test-enums-struct-stub-generator.subproject_deps = ctypes cstubs \ ctypes-foreign test-enums-struct-stubs tests-common -test-enums-struct-stub-generator.deps = str bigarray integers +test-enums-struct-stub-generator.deps = str bigarray-compat integers test-enums-struct-stub-generator: PROJECT=test-enums-struct-stub-generator test-enums-struct-stub-generator: $$(BEST_TARGET) test-enums.dir = tests/test-enums test-enums.threads = yes -test-enums.deps = str bigarray oUnit integers +test-enums.deps = str bigarray-compat oUnit integers test-enums.subproject_deps = ctypes ctypes-foreign \ cstubs test-enums-struct-stubs test-enums-stubs tests-common test-enums.link_flags = -L$(BUILDDIR)/clib -ltest_functions @@ -313,13 +313,13 @@ test-structs-stub-generator.dir = tests/test-structs/stub-generator test-structs-stub-generator.threads = yes test-structs-stub-generator.subproject_deps = ctypes cstubs \ ctypes-foreign test-structs-stubs tests-common -test-structs-stub-generator.deps = str bigarray integers +test-structs-stub-generator.deps = str bigarray-compat integers test-structs-stub-generator: PROJECT=test-structs-stub-generator test-structs-stub-generator: $$(BEST_TARGET) test-structs.dir = tests/test-structs test-structs.threads = yes -test-structs.deps = str bigarray oUnit integers +test-structs.deps = str bigarray-compat oUnit integers test-structs.subproject_deps = ctypes ctypes-foreign \ cstubs test-structs-stubs tests-common test-structs.link_flags = -L$(BUILDDIR)/clib -ltest_functions @@ -356,13 +356,13 @@ test-constants-stub-generator.dir = tests/test-constants/stub-generator test-constants-stub-generator.threads = yes test-constants-stub-generator.subproject_deps = ctypes cstubs \ ctypes-foreign test-constants-stubs tests-common -test-constants-stub-generator.deps = str bigarray integers +test-constants-stub-generator.deps = str bigarray-compat integers test-constants-stub-generator: PROJECT=test-constants-stub-generator test-constants-stub-generator: $$(BEST_TARGET) test-constants.dir = tests/test-constants test-constants.threads = yes -test-constants.deps = str bigarray oUnit integers +test-constants.deps = str bigarray-compat oUnit integers test-constants.subproject_deps = ctypes ctypes-foreign \ cstubs test-constants-stubs tests-common test-constants.link_flags = -L$(BUILDDIR)/clib -ltest_functions @@ -391,7 +391,7 @@ $(BUILDDIR)/tests/test-constants/generated_struct_stubs.c: $(BUILDDIR)/test-cons test-finalisers.dir = tests/test-finalisers test-finalisers.threads = yes -test-finalisers.deps = str bigarray oUnit integers +test-finalisers.deps = str bigarray-compat oUnit integers test-finalisers.subproject_deps = ctypes ctypes-foreign test-finalisers: PROJECT=test-finalisers test-finalisers: $$(BEST_TARGET) @@ -407,13 +407,13 @@ test-cstdlib-stub-generator.dir = tests/test-cstdlib/stub-generator test-cstdlib-stub-generator.threads = yes test-cstdlib-stub-generator.subproject_deps = ctypes cstubs \ ctypes-foreign test-cstdlib-stubs tests-common -test-cstdlib-stub-generator.deps = str bigarray integers +test-cstdlib-stub-generator.deps = str bigarray-compat integers test-cstdlib-stub-generator: PROJECT=test-cstdlib-stub-generator test-cstdlib-stub-generator: $$(BEST_TARGET) test-cstdlib.dir = tests/test-cstdlib test-cstdlib.threads = yes -test-cstdlib.deps = str bigarray oUnit integers +test-cstdlib.deps = str bigarray-compat oUnit integers test-cstdlib.subproject_deps = ctypes ctypes-foreign \ cstubs test-cstdlib-stubs tests-common test-cstdlib.link_flags = -L$(BUILDDIR)/clib -ltest_functions @@ -433,13 +433,14 @@ tests/test-cstdlib/generated_bindings.ml: $(BUILDDIR)/test-cstdlib-stub-generato test-sizeof.dir = tests/test-sizeof test-sizeof.threads = yes -test-sizeof.deps = str bigarray oUnit integers +test-sizeof.deps = str bigarray-compat oUnit integers test-sizeof.subproject_deps = ctypes ctypes-foreign test-sizeof: PROJECT=test-sizeof test-sizeof: $$(BEST_TARGET) test-foreign_values-stubs.dir = tests/test-foreign_values/stubs test-foreign_values-stubs.threads = yes +test-foreign_values-stubs.deps = bigarray-compat test-foreign_values-stubs.subproject_deps = ctypes \ ctypes-foreign tests-common test-foreign_values-stubs: PROJECT=test-foreign_values-stubs @@ -449,13 +450,13 @@ test-foreign_values-stub-generator.dir = tests/test-foreign_values/stub-generato test-foreign_values-stub-generator.threads = yes test-foreign_values-stub-generator.subproject_deps = ctypes cstubs \ ctypes-foreign test-foreign_values-stubs tests-common -test-foreign_values-stub-generator.deps = str bigarray integers +test-foreign_values-stub-generator.deps = str bigarray-compat integers test-foreign_values-stub-generator: PROJECT=test-foreign_values-stub-generator test-foreign_values-stub-generator: $$(BEST_TARGET) test-foreign_values.dir = tests/test-foreign_values test-foreign_values.threads = yes -test-foreign_values.deps = str bigarray oUnit integers +test-foreign_values.deps = str bigarray-compat oUnit integers test-foreign_values.subproject_deps = ctypes ctypes-foreign \ cstubs tests-common test-foreign_values-stubs test-foreign_values.link_flags = -L$(BUILDDIR)/clib -ltest_functions @@ -484,13 +485,13 @@ test-unions-stub-generator.dir = tests/test-unions/stub-generator test-unions-stub-generator.threads = yes test-unions-stub-generator.subproject_deps = ctypes cstubs \ ctypes-foreign test-unions-stubs tests-common -test-unions-stub-generator.deps = str bigarray integers +test-unions-stub-generator.deps = str bigarray-compat integers test-unions-stub-generator: PROJECT=test-unions-stub-generator test-unions-stub-generator: $$(BEST_TARGET) test-unions.dir = tests/test-unions test-unions.threads = yes -test-unions.deps = str bigarray oUnit integers +test-unions.deps = str bigarray-compat oUnit integers test-unions.subproject_deps = ctypes ctypes-foreign \ cstubs test-unions-stubs tests-common test-unions.link_flags = -L$(BUILDDIR)/clib -ltest_functions @@ -518,7 +519,7 @@ $(BUILDDIR)/tests/test-unions/generated_struct_stubs.c: $(BUILDDIR)/test-unions- test-custom_ops.dir = tests/test-custom_ops test-custom_ops.threads = yes -test-custom_ops.deps = str bigarray oUnit integers +test-custom_ops.deps = str bigarray-compat oUnit integers test-custom_ops.subproject_deps = ctypes ctypes-foreign test-custom_ops: PROJECT=test-custom_ops test-custom_ops: $$(BEST_TARGET) @@ -534,13 +535,13 @@ test-arrays-stub-generator.dir = tests/test-arrays/stub-generator test-arrays-stub-generator.threads = yes test-arrays-stub-generator.subproject_deps = ctypes cstubs \ ctypes-foreign test-arrays-stubs tests-common -test-arrays-stub-generator.deps = str bigarray integers +test-arrays-stub-generator.deps = str bigarray-compat integers test-arrays-stub-generator: PROJECT=test-arrays-stub-generator test-arrays-stub-generator: $$(BEST_TARGET) test-arrays.dir = tests/test-arrays test-arrays.threads = yes -test-arrays.deps = str bigarray oUnit integers +test-arrays.deps = str bigarray-compat oUnit integers test-arrays.subproject_deps = ctypes ctypes-foreign \ cstubs test-arrays-stubs tests-common test-arrays.link_flags = -L$(BUILDDIR)/clib -ltest_functions @@ -560,21 +561,21 @@ tests/test-arrays/generated_bindings.ml: $(BUILDDIR)/test-arrays-stub-generator. test-foreign-errno.dir = tests/test-foreign-errno test-foreign-errno.threads = yes -test-foreign-errno.deps = str bigarray oUnit integers +test-foreign-errno.deps = str bigarray-compat oUnit integers test-foreign-errno.subproject_deps = ctypes ctypes-foreign test-foreign-errno: PROJECT=test-foreign-errno test-foreign-errno: $$(BEST_TARGET) test-passable.dir = tests/test-passable test-passable.threads = yes -test-passable.deps = str bigarray oUnit integers +test-passable.deps = str bigarray-compat oUnit integers test-passable.subproject_deps = ctypes ctypes-foreign cstubs test-passable: PROJECT=test-passable test-passable: $$(BEST_TARGET) test-alignment.dir = tests/test-alignment test-alignment.threads = yes -test-alignment.deps = str bigarray oUnit integers +test-alignment.deps = str bigarray-compat oUnit integers test-alignment.subproject_deps = ctypes ctypes-foreign test-alignment: PROJECT=test-alignment test-alignment: $$(BEST_TARGET) @@ -590,13 +591,13 @@ test-views-stub-generator.dir = tests/test-views/stub-generator test-views-stub-generator.threads = yes test-views-stub-generator.subproject_deps = ctypes cstubs \ ctypes-foreign test-views-stubs tests-common -test-views-stub-generator.deps = str bigarray integers +test-views-stub-generator.deps = str bigarray-compat integers test-views-stub-generator: PROJECT=test-views-stub-generator test-views-stub-generator: $$(BEST_TARGET) test-views.dir = tests/test-views test-views.threads = yes -test-views.deps = str bigarray oUnit integers +test-views.deps = str bigarray-compat oUnit integers test-views.subproject_deps = ctypes ctypes-foreign cstubs test-views-stubs tests-common test-views.link_flags = -L$(BUILDDIR)/clib -ltest_functions test-views: PROJECT=test-views @@ -624,13 +625,13 @@ test-oo_style-stub-generator.dir = tests/test-oo_style/stub-generator test-oo_style-stub-generator.threads = yes test-oo_style-stub-generator.subproject_deps = ctypes cstubs \ ctypes-foreign test-oo_style-stubs tests-common -test-oo_style-stub-generator.deps = str bigarray integers +test-oo_style-stub-generator.deps = str bigarray-compat integers test-oo_style-stub-generator: PROJECT=test-oo_style-stub-generator test-oo_style-stub-generator: $$(BEST_TARGET) test-oo_style.dir = tests/test-oo_style test-oo_style.threads = yes -test-oo_style.deps = str bigarray oUnit integers +test-oo_style.deps = str bigarray-compat oUnit integers test-oo_style.subproject_deps = ctypes ctypes-foreign \ cstubs test-oo_style-stubs tests-common test-oo_style.link_flags = -L$(BUILDDIR)/clib -ltest_functions @@ -650,7 +651,7 @@ tests/test-oo_style/generated_bindings.ml: $(BUILDDIR)/test-oo_style-stub-genera test-marshal.dir = tests/test-marshal test-marshal.threads = yes -test-marshal.deps = str bigarray oUnit integers +test-marshal.deps = str bigarray-compat oUnit integers test-marshal.subproject_deps = ctypes ctypes-foreign \ cstubs tests-common test-marshal.link_flags = -L$(BUILDDIR)/clib -ltest_functions @@ -659,7 +660,7 @@ test-marshal: $$(BEST_TARGET) test-type_printing.dir = tests/test-type_printing test-type_printing.threads = yes -test-type_printing.deps = str bigarray oUnit integers +test-type_printing.deps = str bigarray-compat oUnit integers test-type_printing.subproject_deps = ctypes ctypes-foreign \ cstubs test-type_printing-stubs tests-common test-type_printing.link_flags = -L$(BUILDDIR)/clib -ltest_functions @@ -677,7 +678,7 @@ test-type_printing-stub-generator.dir = tests/test-type_printing/stub-generator test-type_printing-stub-generator.threads = yes test-type_printing-stub-generator.subproject_deps = ctypes cstubs \ ctypes-foreign test-type_printing-stubs tests-common -test-type_printing-stub-generator.deps = str bigarray integers +test-type_printing-stub-generator.deps = str bigarray-compat integers test-type_printing-stub-generator: PROJECT=test-type_printing-stub-generator test-type_printing-stub-generator: $$(BEST_TARGET) @@ -705,13 +706,13 @@ test-value_printing-stub-generator.dir = tests/test-value_printing/stub-generato test-value_printing-stub-generator.threads = yes test-value_printing-stub-generator.subproject_deps = ctypes cstubs \ ctypes-foreign test-value_printing-stubs tests-common -test-value_printing-stub-generator.deps = str bigarray integers +test-value_printing-stub-generator.deps = str bigarray-compat integers test-value_printing-stub-generator: PROJECT=test-value_printing-stub-generator test-value_printing-stub-generator: $$(BEST_TARGET) test-value_printing.dir = tests/test-value_printing test-value_printing.threads = yes -test-value_printing.deps = str bigarray oUnit integers +test-value_printing.deps = str bigarray-compat oUnit integers test-value_printing.subproject_deps = ctypes ctypes-foreign \ cstubs tests-common test-value_printing-stubs test-value_printing.link_flags = -L$(BUILDDIR)/clib -ltest_functions @@ -740,13 +741,13 @@ test-complex-stub-generator.dir = tests/test-complex/stub-generator test-complex-stub-generator.threads = yes test-complex-stub-generator.subproject_deps = ctypes cstubs \ ctypes-foreign test-complex-stubs tests-common -test-complex-stub-generator.deps = str bigarray integers +test-complex-stub-generator.deps = str bigarray-compat integers test-complex-stub-generator: PROJECT=test-complex-stub-generator test-complex-stub-generator: $$(BEST_TARGET) test-complex.dir = tests/test-complex test-complex.threads = yes -test-complex.deps = str bigarray oUnit integers +test-complex.deps = str bigarray-compat oUnit integers test-complex.subproject_deps = ctypes ctypes-foreign \ cstubs tests-common test-complex-stubs test-complex.link_flags = -L$(BUILDDIR)/clib -ltest_functions @@ -775,13 +776,13 @@ test-bools-stub-generator.dir = tests/test-bools/stub-generator test-bools-stub-generator.threads = yes test-bools-stub-generator.subproject_deps = ctypes cstubs \ ctypes-foreign test-bools-stubs tests-common -test-bools-stub-generator.deps = str bigarray integers +test-bools-stub-generator.deps = str bigarray-compat integers test-bools-stub-generator: PROJECT=test-bools-stub-generator test-bools-stub-generator: $$(BEST_TARGET) test-bools.dir = tests/test-bools test-bools.threads = yes -test-bools.deps = str bigarray oUnit integers +test-bools.deps = str bigarray-compat oUnit integers test-bools.subproject_deps = ctypes ctypes-foreign \ cstubs tests-common test-bools-stubs test-bools.link_flags = -L$(BUILDDIR)/clib -ltest_functions @@ -810,13 +811,13 @@ test-callback_lifetime-stub-generator.dir = tests/test-callback_lifetime/stub-ge test-callback_lifetime-stub-generator.threads = yes test-callback_lifetime-stub-generator.subproject_deps = ctypes cstubs \ ctypes-foreign test-callback_lifetime-stubs tests-common -test-callback_lifetime-stub-generator.deps = str bigarray integers +test-callback_lifetime-stub-generator.deps = str bigarray-compat integers test-callback_lifetime-stub-generator: PROJECT=test-callback_lifetime-stub-generator test-callback_lifetime-stub-generator: $$(BEST_TARGET) test-callback_lifetime.dir = tests/test-callback_lifetime test-callback_lifetime.threads = yes -test-callback_lifetime.deps = str bigarray oUnit integers +test-callback_lifetime.deps = str bigarray-compat oUnit integers test-callback_lifetime.subproject_deps = ctypes ctypes-foreign \ cstubs test-callback_lifetime-stubs tests-common test-callback_lifetime.link_flags = -L$(BUILDDIR)/clib -ltest_functions @@ -845,13 +846,13 @@ test-lifetime-stub-generator.dir = tests/test-lifetime/stub-generator test-lifetime-stub-generator.threads = yes test-lifetime-stub-generator.subproject_deps = ctypes cstubs \ ctypes-foreign test-lifetime-stubs tests-common -test-lifetime-stub-generator.deps = str bigarray integers +test-lifetime-stub-generator.deps = str bigarray-compat integers test-lifetime-stub-generator: PROJECT=test-lifetime-stub-generator test-lifetime-stub-generator: $$(BEST_TARGET) test-lifetime.dir = tests/test-lifetime test-lifetime.threads = yes -test-lifetime.deps = str bigarray oUnit integers +test-lifetime.deps = str bigarray-compat oUnit integers test-lifetime.subproject_deps = ctypes ctypes-foreign \ cstubs test-lifetime-stubs tests-common test-lifetime.link_flags = -L$(BUILDDIR)/clib -ltest_functions @@ -871,7 +872,7 @@ tests/test-lifetime/generated_bindings.ml: $(BUILDDIR)/test-lifetime-stub-genera test-stubs.dir = tests/test-stubs test-stubs.threads = yes -test-stubs.deps = str bigarray oUnit integers +test-stubs.deps = str bigarray-compat oUnit integers test-stubs.subproject_deps = ctypes ctypes-foreign test-stubs: PROJECT=test-stubs test-stubs: $$(BEST_TARGET) @@ -887,13 +888,13 @@ test-bigarrays-stub-generator.dir = tests/test-bigarrays/stub-generator test-bigarrays-stub-generator.threads = yes test-bigarrays-stub-generator.subproject_deps = ctypes cstubs \ ctypes-foreign test-bigarrays-stubs tests-common -test-bigarrays-stub-generator.deps = str bigarray integers +test-bigarrays-stub-generator.deps = str bigarray-compat integers test-bigarrays-stub-generator: PROJECT=test-bigarrays-stub-generator test-bigarrays-stub-generator: $$(BEST_TARGET) test-bigarrays.dir = tests/test-bigarrays test-bigarrays.threads = yes -test-bigarrays.deps = str bigarray oUnit integers +test-bigarrays.deps = str bigarray-compat oUnit integers test-bigarrays.subproject_deps = ctypes ctypes-foreign \ cstubs tests-common test-bigarrays-stubs test-bigarrays.link_flags = -L$(BUILDDIR)/clib -ltest_functions @@ -922,13 +923,13 @@ test-coercions-stub-generator.dir = tests/test-coercions/stub-generator test-coercions-stub-generator.threads = yes test-coercions-stub-generator.subproject_deps = ctypes cstubs \ ctypes-foreign test-coercions-stubs tests-common -test-coercions-stub-generator.deps = str bigarray integers +test-coercions-stub-generator.deps = str bigarray-compat integers test-coercions-stub-generator: PROJECT=test-coercions-stub-generator test-coercions-stub-generator: $$(BEST_TARGET) test-coercions.dir = tests/test-coercions test-coercions.threads = yes -test-coercions.deps = str bigarray oUnit integers +test-coercions.deps = str bigarray-compat oUnit integers test-coercions.subproject_deps = ctypes ctypes-foreign \ cstubs tests-common test-coercions-stubs test-coercions.link_flags = -L$(BUILDDIR)/clib -ltest_functions @@ -948,7 +949,7 @@ tests/test-coercions/generated_bindings.ml: $(BUILDDIR)/test-coercions-stub-gene test-roots.dir = tests/test-roots test-roots.threads = yes -test-roots.deps = str bigarray oUnit integers +test-roots.deps = str bigarray-compat oUnit integers test-roots.subproject_deps = ctypes ctypes-foreign \ cstubs tests-common test-roots.link_flags = -L$(BUILDDIR)/clib -ltest_functions @@ -966,13 +967,13 @@ test-passing-ocaml-values-stub-generator.dir = tests/test-passing-ocaml-values/s test-passing-ocaml-values-stub-generator.threads = yes test-passing-ocaml-values-stub-generator.subproject_deps = ctypes cstubs \ ctypes-foreign test-passing-ocaml-values-stubs tests-common -test-passing-ocaml-values-stub-generator.deps = str bigarray integers +test-passing-ocaml-values-stub-generator.deps = str bigarray-compat integers test-passing-ocaml-values-stub-generator: PROJECT=test-passing-ocaml-values-stub-generator test-passing-ocaml-values-stub-generator: $$(BEST_TARGET) test-passing-ocaml-values.dir = tests/test-passing-ocaml-values test-passing-ocaml-values.threads = yes -test-passing-ocaml-values.deps = str bigarray oUnit integers +test-passing-ocaml-values.deps = str bigarray-compat oUnit integers test-passing-ocaml-values.subproject_deps = ctypes ctypes-foreign \ cstubs tests-common test-passing-ocaml-values-stubs test-passing-ocaml-values.link_flags = -L$(BUILDDIR)/clib -ltest_functions @@ -1001,13 +1002,13 @@ test-funptrs-stub-generator.dir = tests/test-funptrs/stub-generator test-funptrs-stub-generator.threads = yes test-funptrs-stub-generator.subproject_deps = ctypes cstubs \ ctypes-foreign test-funptrs-stubs tests-common -test-funptrs-stub-generator.deps = str bigarray integers +test-funptrs-stub-generator.deps = str bigarray-compat integers test-funptrs-stub-generator: PROJECT=test-funptrs-stub-generator test-funptrs-stub-generator: $$(BEST_TARGET) test-funptrs.dir = tests/test-funptrs test-funptrs.threads = yes -test-funptrs.deps = str bigarray oUnit integers +test-funptrs.deps = str bigarray-compat oUnit integers test-funptrs.subproject_deps = ctypes ctypes-foreign \ cstubs tests-common test-funptrs-stubs test-funptrs.link_flags = -L$(BUILDDIR)/clib -ltest_functions @@ -1036,13 +1037,13 @@ test-lwt-jobs-stub-generator.dir = tests/test-lwt-jobs/stub-generator test-lwt-jobs-stub-generator.threads = yes test-lwt-jobs-stub-generator.subproject_deps = ctypes cstubs \ ctypes-foreign test-lwt-jobs-stubs tests-common -test-lwt-jobs-stub-generator.deps = str bigarray integers +test-lwt-jobs-stub-generator.deps = str bigarray-compat integers test-lwt-jobs-stub-generator: PROJECT=test-lwt-jobs-stub-generator test-lwt-jobs-stub-generator: $$(BEST_TARGET) test-lwt-jobs.dir = tests/test-lwt-jobs test-lwt-jobs.threads = yes -test-lwt-jobs.deps = str bigarray oUnit integers lwt.unix +test-lwt-jobs.deps = str bigarray-compat oUnit integers lwt.unix test-lwt-jobs.subproject_deps = ctypes ctypes-foreign \ cstubs tests-common test-lwt-jobs-stubs test-lwt-jobs.link_flags = -L$(BUILDDIR)/clib -ltest_functions @@ -1079,13 +1080,13 @@ test-lwt-preemptive-stub-generator.dir = tests/test-lwt-preemptive/stub-generato test-lwt-preemptive-stub-generator.threads = yes test-lwt-preemptive-stub-generator.subproject_deps = ctypes cstubs \ ctypes-foreign test-lwt-preemptive-stubs tests-common -test-lwt-preemptive-stub-generator.deps = str bigarray integers +test-lwt-preemptive-stub-generator.deps = str bigarray-compat integers test-lwt-preemptive-stub-generator: PROJECT=test-lwt-preemptive-stub-generator test-lwt-preemptive-stub-generator: $$(BEST_TARGET) test-lwt-preemptive.dir = tests/test-lwt-preemptive test-lwt-preemptive.threads = yes -test-lwt-preemptive.deps = str bigarray oUnit integers lwt.unix +test-lwt-preemptive.deps = str bigarray-compat oUnit integers lwt.unix test-lwt-preemptive.subproject_deps = ctypes ctypes-foreign \ cstubs tests-common test-lwt-preemptive-stubs test-lwt-preemptive.link_flags = -L$(BUILDDIR)/clib -ltest_functions @@ -1122,13 +1123,13 @@ test-returning-errno-lwt-jobs-stub-generator.dir = tests/test-returning-errno-lw test-returning-errno-lwt-jobs-stub-generator.threads = yes test-returning-errno-lwt-jobs-stub-generator.subproject_deps = ctypes cstubs \ ctypes-foreign test-returning-errno-lwt-jobs-stubs tests-common -test-returning-errno-lwt-jobs-stub-generator.deps = str bigarray integers +test-returning-errno-lwt-jobs-stub-generator.deps = str bigarray-compat integers test-returning-errno-lwt-jobs-stub-generator: PROJECT=test-returning-errno-lwt-jobs-stub-generator test-returning-errno-lwt-jobs-stub-generator: $$(BEST_TARGET) test-returning-errno-lwt-jobs.dir = tests/test-returning-errno-lwt-jobs test-returning-errno-lwt-jobs.threads = yes -test-returning-errno-lwt-jobs.deps = str bigarray oUnit integers lwt.unix +test-returning-errno-lwt-jobs.deps = str bigarray-compat oUnit integers lwt.unix test-returning-errno-lwt-jobs.subproject_deps = ctypes ctypes-foreign \ cstubs tests-common test-returning-errno-lwt-jobs-stubs test-returning-errno-lwt-jobs.link_flags = -L$(BUILDDIR)/clib -ltest_functions @@ -1164,13 +1165,13 @@ test-returning-errno-lwt-preemptive-stub-generator.dir = tests/test-returning-er test-returning-errno-lwt-preemptive-stub-generator.threads = yes test-returning-errno-lwt-preemptive-stub-generator.subproject_deps = ctypes cstubs \ ctypes-foreign test-returning-errno-lwt-preemptive-stubs tests-common -test-returning-errno-lwt-preemptive-stub-generator.deps = str bigarray integers +test-returning-errno-lwt-preemptive-stub-generator.deps = str bigarray-compat integers test-returning-errno-lwt-preemptive-stub-generator: PROJECT=test-returning-errno-lwt-preemptive-stub-generator test-returning-errno-lwt-preemptive-stub-generator: $$(BEST_TARGET) test-returning-errno-lwt-preemptive.dir = tests/test-returning-errno-lwt-preemptive test-returning-errno-lwt-preemptive.threads = yes -test-returning-errno-lwt-preemptive.deps = str bigarray oUnit integers lwt.unix +test-returning-errno-lwt-preemptive.deps = str bigarray-compat oUnit integers lwt.unix test-returning-errno-lwt-preemptive.subproject_deps = ctypes ctypes-foreign \ cstubs tests-common test-returning-errno-lwt-preemptive-stubs test-returning-errno-lwt-preemptive.link_flags = -L$(BUILDDIR)/clib -ltest_functions @@ -1206,13 +1207,13 @@ test-returning-errno-stub-generator.dir = tests/test-returning-errno/stub-genera test-returning-errno-stub-generator.threads = yes test-returning-errno-stub-generator.subproject_deps = ctypes cstubs \ ctypes-foreign test-returning-errno-stubs tests-common -test-returning-errno-stub-generator.deps = str bigarray integers +test-returning-errno-stub-generator.deps = str bigarray-compat integers test-returning-errno-stub-generator: PROJECT=test-returning-errno-stub-generator test-returning-errno-stub-generator: $$(BEST_TARGET) test-returning-errno.dir = tests/test-returning-errno test-returning-errno.threads = yes -test-returning-errno.deps = str bigarray oUnit integers +test-returning-errno.deps = str bigarray-compat oUnit integers test-returning-errno.subproject_deps = ctypes ctypes-foreign \ cstubs tests-common test-returning-errno-stubs test-returning-errno.link_flags = -L$(BUILDDIR)/clib -ltest_functions @@ -1249,13 +1250,13 @@ test-threads-stub-generator.dir = tests/test-threads/stub-generator test-threads-stub-generator.threads = yes test-threads-stub-generator.subproject_deps = ctypes cstubs \ ctypes-foreign test-threads-stubs tests-common -test-threads-stub-generator.deps = str bigarray integers +test-threads-stub-generator.deps = str bigarray-compat integers test-threads-stub-generator: PROJECT=test-threads-stub-generator test-threads-stub-generator: $$(BEST_TARGET) test-threads.dir = tests/test-threads test-threads.threads = yes -test-threads.deps = str bigarray oUnit integers +test-threads.deps = str bigarray-compat oUnit integers test-threads.subproject_deps = ctypes ctypes-foreign \ cstubs tests-common test-threads-stubs test-threads.link_flags = -L$(BUILDDIR)/clib -ltest_functions @@ -1284,13 +1285,13 @@ test-closure-type-promotion-stub-generator.dir = tests/test-closure-type-promoti test-closure-type-promotion-stub-generator.threads = yes test-closure-type-promotion-stub-generator.subproject_deps = ctypes cstubs \ ctypes-foreign test-closure-type-promotion-stubs tests-common -test-closure-type-promotion-stub-generator.deps = str bigarray integers +test-closure-type-promotion-stub-generator.deps = str bigarray-compat integers test-closure-type-promotion-stub-generator: PROJECT=test-closure-type-promotion-stub-generator test-closure-type-promotion-stub-generator: $$(BEST_TARGET) test-closure-type-promotion.dir = tests/test-closure-type-promotion test-closure-type-promotion.threads = yes -test-closure-type-promotion.deps = str bigarray oUnit integers +test-closure-type-promotion.deps = str bigarray-compat oUnit integers test-closure-type-promotion.subproject_deps = ctypes ctypes-foreign \ cstubs test-closure-type-promotion-stubs tests-common test-closure-type-promotion.link_flags = -L$(BUILDDIR)/clib -ltest_functions @@ -1310,7 +1311,7 @@ tests/test-closure-type-promotion/generated_bindings.ml: $(BUILDDIR)/test-closur test-ldouble.dir = tests/test-ldouble test-ldouble.threads = yes -test-ldouble.deps = str bigarray oUnit integers +test-ldouble.deps = str bigarray-compat oUnit integers test-ldouble.subproject_deps = ctypes test-ldouble: PROJECT=test-ldouble test-ldouble: $$(BEST_TARGET) diff --git a/tests/test-alignment/test_alignment.ml b/tests/test-alignment/test_alignment.ml index 4347e68a5..07f234603 100644 --- a/tests/test-alignment/test_alignment.ml +++ b/tests/test-alignment/test_alignment.ml @@ -242,8 +242,8 @@ let test_struct_tail_padding _ = *) let test_bigarray_alignment _ = let module M = struct - module B = Bigarray - type k = K : ('a, 'b) Bigarray.kind * int -> k + module B = Bigarray_compat + type k = K : ('a, 'b) Bigarray_compat.kind * int -> k let kind_alignments = [ K (B.float32, alignment float); K (B.float64, alignment double); diff --git a/tests/test-bigarrays/test_bigarrays.ml b/tests/test-bigarrays/test_bigarrays.ml index acc7459f7..1ec923b76 100644 --- a/tests/test-bigarrays/test_bigarrays.ml +++ b/tests/test-bigarrays/test_bigarrays.ml @@ -10,7 +10,7 @@ type 'a std_array = 'a array open OUnit2 open Ctypes -module BA = Bigarray +module BA = Bigarray_compat let array_of_list2 typ list2 = @@ -325,14 +325,14 @@ let test_ctypes_array_of_bigarray _ = *) let test_fortran_layout_bigarrays _ = (* array1 *) - let a1c = bigarray_of_array array1 Bigarray.int32 + let a1c = bigarray_of_array array1 Bigarray_compat.int32 (CArray.of_list int32_t [10l; 20l; 30l; 40l]) in let p1 = bigarray_start array1 a1c in - let a1f = fortran_bigarray_of_ptr array1 4 Bigarray.int32 p1 in + let a1f = fortran_bigarray_of_ptr array1 4 Bigarray_compat.int32 p1 in begin - assert_equal 4 (Bigarray.Array1.dim a1f); - assert_equal Bigarray.int32 (Bigarray.Array1.kind a1f); - assert_equal Bigarray.fortran_layout (Bigarray.Array1.layout a1f); + assert_equal 4 (Bigarray_compat.Array1.dim a1f); + assert_equal Bigarray_compat.int32 (Bigarray_compat.Array1.kind a1f); + assert_equal Bigarray_compat.fortran_layout (Bigarray_compat.Array1.layout a1f); assert_equal a1f.{1} 10l; assert_equal a1f.{2} 20l; assert_equal a1f.{3} 30l; @@ -340,19 +340,19 @@ let test_fortran_layout_bigarrays _ = end; (* array2 *) - let a2c = bigarray_of_array array2 Bigarray.int32 + let a2c = bigarray_of_array array2 Bigarray_compat.int32 (CArray.of_list (array 2 int32_t) [CArray.of_list int32_t [10l; 20l]; CArray.of_list int32_t [30l; 40l]; CArray.of_list int32_t [50l; 60l]; CArray.of_list int32_t [70l; 80l]]) in let p2 = bigarray_start array2 a2c in - let a2f = fortran_bigarray_of_ptr array2 (4,2) Bigarray.int32 p2 in + let a2f = fortran_bigarray_of_ptr array2 (4,2) Bigarray_compat.int32 p2 in begin - assert_equal 4 (Bigarray.Array2.dim1 a2f); - assert_equal 2 (Bigarray.Array2.dim2 a2f); - assert_equal Bigarray.int32 (Bigarray.Array2.kind a2f); - assert_equal Bigarray.fortran_layout (Bigarray.Array2.layout a2f); + assert_equal 4 (Bigarray_compat.Array2.dim1 a2f); + assert_equal 2 (Bigarray_compat.Array2.dim2 a2f); + assert_equal Bigarray_compat.int32 (Bigarray_compat.Array2.kind a2f); + assert_equal Bigarray_compat.fortran_layout (Bigarray_compat.Array2.layout a2f); assert_equal a2f.{1,1} 10l; assert_equal a2f.{2,1} 20l; assert_equal a2f.{3,1} 30l; @@ -365,27 +365,27 @@ let test_fortran_layout_bigarrays _ = end; (* genarray *) - let agc = bigarray_of_array genarray Bigarray.int32 + let agc = bigarray_of_array genarray Bigarray_compat.int32 (CArray.of_list int32_t [10l; 20l; 30l; 40l; 50l; 60l; 70l; 80l]) in let pg = bigarray_start genarray agc in - let agf = fortran_bigarray_of_ptr genarray [|4;2|] Bigarray.int32 pg in + let agf = fortran_bigarray_of_ptr genarray [|4;2|] Bigarray_compat.int32 pg in begin - assert_equal [|4;2|] (Bigarray.Genarray.dims agf); - assert_equal Bigarray.int32 (Bigarray.Genarray.kind agf); - assert_equal Bigarray.fortran_layout (Bigarray.Genarray.layout agf); - assert_equal (Bigarray.Genarray.get agf [|1;1|]) 10l; - assert_equal (Bigarray.Genarray.get agf [|2;1|]) 20l; - assert_equal (Bigarray.Genarray.get agf [|3;1|]) 30l; - assert_equal (Bigarray.Genarray.get agf [|4;1|]) 40l; - - assert_equal (Bigarray.Genarray.get agf [|1;2|]) 50l; - assert_equal (Bigarray.Genarray.get agf [|2;2|]) 60l; - assert_equal (Bigarray.Genarray.get agf [|3;2|]) 70l; - assert_equal (Bigarray.Genarray.get agf [|4;2|]) 80l; + assert_equal [|4;2|] (Bigarray_compat.Genarray.dims agf); + assert_equal Bigarray_compat.int32 (Bigarray_compat.Genarray.kind agf); + assert_equal Bigarray_compat.fortran_layout (Bigarray_compat.Genarray.layout agf); + assert_equal (Bigarray_compat.Genarray.get agf [|1;1|]) 10l; + assert_equal (Bigarray_compat.Genarray.get agf [|2;1|]) 20l; + assert_equal (Bigarray_compat.Genarray.get agf [|3;1|]) 30l; + assert_equal (Bigarray_compat.Genarray.get agf [|4;1|]) 40l; + + assert_equal (Bigarray_compat.Genarray.get agf [|1;2|]) 50l; + assert_equal (Bigarray_compat.Genarray.get agf [|2;2|]) 60l; + assert_equal (Bigarray_compat.Genarray.get agf [|3;2|]) 70l; + assert_equal (Bigarray_compat.Genarray.get agf [|4;2|]) 80l; end @@ -464,7 +464,7 @@ let test_bigarray_lifetime_with_ctypes_reference _ = let () = let pointer = (* Allocate a bigarray and attach a ctypes pointer *) - let ba = Bigarray.(Array2.create int c_layout) 1024 1024 in + let ba = Bigarray_compat.(Array2.create int c_layout) 1024 1024 in begin ba.{0,0} <- 1; Gc.finalise finalise ba; diff --git a/tests/test-coercions/test_coercions.ml b/tests/test-coercions/test_coercions.ml index 6505bcf92..d8eeffb80 100644 --- a/tests/test-coercions/test_coercions.ml +++ b/tests/test-coercions/test_coercions.ml @@ -25,7 +25,7 @@ let test_pointer_coercions _ = T complex64; T (ptr double); T string; - T (bigarray array1 10 Bigarray.int32); + T (bigarray array1 10 Bigarray_compat.int32); T (array 5 int32_t); T (structure "s"); T (union "u"); @@ -184,83 +184,83 @@ let test_unsupported_coercions _ = type boxed_type = T : 'a typ -> boxed_type let types = [ T int8_t, - [T uint16_t; T float; T complex64; T (bigarray array1 10 Bigarray.int32); + [T uint16_t; T float; T complex64; T (bigarray array1 10 Bigarray_compat.int32); T (array 5 int32_t); T (structure "s"); T (union "u"); T (abstract ~name:"a" ~size:12 ~alignment:4)]; T uint16_t, [T int8_t; T int; T float; T short; T complex64; - T (bigarray array1 10 Bigarray.int32); T (array 5 int32_t); + T (bigarray array1 10 Bigarray_compat.int32); T (array 5 int32_t); T (structure "s"); T (union "u"); T (abstract ~name:"a" ~size:12 ~alignment:4)]; T int, - [T uint16_t; T float; T complex64; T (bigarray array1 10 Bigarray.int32); + [T uint16_t; T float; T complex64; T (bigarray array1 10 Bigarray_compat.int32); T (array 5 int32_t); T (structure "s"); T (union "u"); T (abstract ~name:"a" ~size:12 ~alignment:4)]; T float, [T int8_t; T uint16_t; T int; T short; T complex64; - T (bigarray array1 10 Bigarray.int32); T (array 5 int32_t); + T (bigarray array1 10 Bigarray_compat.int32); T (array 5 int32_t); T (structure "s"); T (union "u"); T (abstract ~name:"a" ~size:12 ~alignment:4)]; T ldouble, [T int8_t; T uint16_t; T int; T short; T complex64; - T (bigarray array1 10 Bigarray.int32); T (array 5 int32_t); + T (bigarray array1 10 Bigarray_compat.int32); T (array 5 int32_t); T (structure "s"); T (union "u"); T (abstract ~name:"a" ~size:12 ~alignment:4)]; T short, - [T uint16_t; T float; T complex64; T (bigarray array1 10 Bigarray.int32); + [T uint16_t; T float; T complex64; T (bigarray array1 10 Bigarray_compat.int32); T (array 5 int32_t); T (structure "s"); T (union "u"); T (abstract ~name:"a" ~size:12 ~alignment:4)]; T complex64, [T int8_t; T uint16_t; T int; T float; T short; - T (bigarray array1 10 Bigarray.int32); T (array 5 int32_t); + T (bigarray array1 10 Bigarray_compat.int32); T (array 5 int32_t); T (structure "s"); T (union "u"); T (abstract ~name:"a" ~size:12 ~alignment:4)]; T complexld, [T int8_t; T uint16_t; T int; T short; - T (bigarray array1 10 Bigarray.int32); T (array 5 int32_t); + T (bigarray array1 10 Bigarray_compat.int32); T (array 5 int32_t); T (structure "s"); T (union "u"); T (abstract ~name:"a" ~size:12 ~alignment:4)]; - T (bigarray array1 10 Bigarray.int32), + T (bigarray array1 10 Bigarray_compat.int32), [T int8_t; T uint16_t; T int; T float; T short; T complex64; - T (bigarray array1 10 Bigarray.int32); T (array 5 int32_t); + T (bigarray array1 10 Bigarray_compat.int32); T (array 5 int32_t); T (structure "s"); T (union "u"); T (abstract ~name:"a" ~size:12 ~alignment:4)]; T (array 5 int32_t), [T int8_t; T uint16_t; T int; T float; T short; T complex64; - T (bigarray array1 10 Bigarray.int32); T (array 5 int32_t); + T (bigarray array1 10 Bigarray_compat.int32); T (array 5 int32_t); T (structure "s"); T (union "u"); T (abstract ~name:"a" ~size:12 ~alignment:4)]; T (structure "s"), [T int8_t; T uint16_t; T int; T float; T short; T complex64; - T (bigarray array1 10 Bigarray.int32); T (array 5 int32_t); + T (bigarray array1 10 Bigarray_compat.int32); T (array 5 int32_t); T (structure "s"); T (union "u"); T (abstract ~name:"a" ~size:12 ~alignment:4)]; T (union "u"), [T int8_t; T uint16_t; T int; T float; T short; T complex64; - T (bigarray array1 10 Bigarray.int32); T (array 5 int32_t); + T (bigarray array1 10 Bigarray_compat.int32); T (array 5 int32_t); T (structure "s"); T (union "u"); T (abstract ~name:"a" ~size:12 ~alignment:4)]; T (abstract ~name:"a" ~size:12 ~alignment:4), [T int8_t; T uint16_t; T int; T float; T short; T complex64; - T (bigarray array1 10 Bigarray.int32); T (array 5 int32_t); + T (bigarray array1 10 Bigarray_compat.int32); T (array 5 int32_t); T (structure "s"); T (union "u"); T (abstract ~name:"a" ~size:12 ~alignment:4)]; T ocaml_string, [T int8_t; T uint16_t; T int; T float; T short; T complex64; - T (bigarray array1 10 Bigarray.int32); T (array 5 int32_t); + T (bigarray array1 10 Bigarray_compat.int32); T (array 5 int32_t); T (structure "s"); T (union "u"); T (abstract ~name:"a" ~size:12 ~alignment:4)]; ] diff --git a/tests/test-foreign_values/stubs/functions.ml b/tests/test-foreign_values/stubs/functions.ml index 5c52a73a4..82e7bc7e9 100644 --- a/tests/test-foreign_values/stubs/functions.ml +++ b/tests/test-foreign_values/stubs/functions.ml @@ -27,7 +27,7 @@ struct (int @-> int @-> returning int)) let string_array = F.(foreign_value "string_array" (array 2 string)) - let int_array = F.(foreign_value "int_array" (bigarray array1 5 Bigarray.int32)) + let int_array = F.(foreign_value "int_array" (bigarray array1 5 Bigarray_compat.int32)) end diff --git a/tests/test-foreign_values/test_foreign_values.ml b/tests/test-foreign_values/test_foreign_values.ml index e06433760..72d324586 100644 --- a/tests/test-foreign_values/test_foreign_values.ml +++ b/tests/test-foreign_values/test_foreign_values.ml @@ -54,9 +54,9 @@ struct let iarr = !@int_array in begin - let expected_ints = Bigarray.(Array1.create int32 c_layout 5) in + let expected_ints = Bigarray_compat.(Array1.create int32 c_layout 5) in for i = 0 to 4 do - Bigarray.Array1.set expected_ints i (Int32.of_int i) + Bigarray_compat.Array1.set expected_ints i (Int32.of_int i) done; assert_equal expected_ints iarr end diff --git a/tests/test-lwt-jobs/test_lwt_jobs.ml b/tests/test-lwt-jobs/test_lwt_jobs.ml index 95d5e54f4..69cdeb8d1 100644 --- a/tests/test-lwt-jobs/test_lwt_jobs.ml +++ b/tests/test-lwt-jobs/test_lwt_jobs.ml @@ -25,7 +25,7 @@ let test_sqrt _ = *) let test_object_lifetime _ = let call = - let open Bigarray in + let open Bigarray_compat in let b = Array1.create int32 c_layout 3 in begin b.{0} <- 1l; diff --git a/tests/test-lwt-preemptive/test_lwt_jobs.ml b/tests/test-lwt-preemptive/test_lwt_jobs.ml index a864d4cae..6645447d8 100644 --- a/tests/test-lwt-preemptive/test_lwt_jobs.ml +++ b/tests/test-lwt-preemptive/test_lwt_jobs.ml @@ -25,7 +25,7 @@ let test_sqrt _ = *) let test_object_lifetime _ = let call = - let open Bigarray in + let open Bigarray_compat in let b = Array1.create int32 c_layout 3 in begin b.{0} <- 1l; diff --git a/tests/test-passable/test_passable.ml b/tests/test-passable/test_passable.ml index 25e7eaed2..911cffe7e 100644 --- a/tests/test-passable/test_passable.ml +++ b/tests/test-passable/test_passable.ml @@ -147,35 +147,35 @@ let test_arrays_are_not_passable _ = let test_bigarrays_are_not_passable _ = assert_raises ~msg:"bigarray type rejected as argument" (Unsupported "Unsupported argument type") - (fun () -> bigarray genarray [|1|] Bigarray.int @-> returning void); + (fun () -> bigarray genarray [|1|] Bigarray_compat.int @-> returning void); assert_raises ~msg:"bigarray1 type rejected as argument" (Unsupported "Unsupported argument type") - (fun () -> bigarray array1 1 Bigarray.int @-> returning void); + (fun () -> bigarray array1 1 Bigarray_compat.int @-> returning void); assert_raises ~msg:"bigarray2 type rejected as argument" (Unsupported "Unsupported argument type") - (fun () -> bigarray array2 (1, 2) Bigarray.int @-> returning void); + (fun () -> bigarray array2 (1, 2) Bigarray_compat.int @-> returning void); assert_raises ~msg:"bigarray3 type rejected as argument" (Unsupported "Unsupported argument type") - (fun () -> bigarray array3 (1, 2, 3) Bigarray.int @-> returning void); + (fun () -> bigarray array3 (1, 2, 3) Bigarray_compat.int @-> returning void); assert_raises ~msg:"bigarray type rejected as return type" (Unsupported "Unsupported return type") - (fun () -> void @-> returning (bigarray genarray [|1|] Bigarray.int)); + (fun () -> void @-> returning (bigarray genarray [|1|] Bigarray_compat.int)); assert_raises ~msg:"bigarray1 type rejected as return type" (Unsupported "Unsupported return type") - (fun () -> void @-> returning (bigarray array1 1 Bigarray.int)); + (fun () -> void @-> returning (bigarray array1 1 Bigarray_compat.int)); assert_raises ~msg:"bigarray2 type rejected as return type" (Unsupported "Unsupported return type") - (fun () -> void @-> returning (bigarray array2 (1, 2) Bigarray.int)); + (fun () -> void @-> returning (bigarray array2 (1, 2) Bigarray_compat.int)); assert_raises ~msg:"bigarray3 type rejected as return type" (Unsupported "Unsupported return type") - (fun () -> void @-> returning (bigarray array3 (1, 2, 3) Bigarray.int)) + (fun () -> void @-> returning (bigarray array3 (1, 2, 3) Bigarray_compat.int)) (* diff --git a/tests/test-sizeof/test_sizeof.ml b/tests/test-sizeof/test_sizeof.ml index 710ae3631..3eafbd184 100644 --- a/tests/test-sizeof/test_sizeof.ml +++ b/tests/test-sizeof/test_sizeof.ml @@ -171,8 +171,8 @@ end *) let test_sizeof_bigarrays _ = let module M = struct - module B = Bigarray - type k = K : ('a, 'b) Bigarray.kind * int -> k + module B = Bigarray_compat + type k = K : ('a, 'b) Bigarray_compat.kind * int -> k let kind_sizes = [ K (B.float32, 4); K (B.float64, 8); diff --git a/tests/test-type_printing/test_type_printing.ml b/tests/test-type_printing/test_type_printing.ml index 4b7fca358..e11309afe 100644 --- a/tests/test-type_printing/test_type_printing.ml +++ b/tests/test-type_printing/test_type_printing.ml @@ -434,22 +434,22 @@ let test_ocaml_string_printing _ = let test_bigarray_signed_printing _ = begin assert_typ_printed_as "int8_t[1][3]" - (bigarray genarray [|1; 3|] Bigarray.int8_signed); + (bigarray genarray [|1; 3|] Bigarray_compat.int8_signed); assert_typ_printed_as "int16_t[3]" - (bigarray array1 3 Bigarray.int16_signed); + (bigarray array1 3 Bigarray_compat.int16_signed); assert_typ_printed_as "int32_t[5][6]" - (bigarray array2 (5, 6) Bigarray.int32); + (bigarray array2 (5, 6) Bigarray_compat.int32); assert_typ_printed_as "int64_t[7][8]" - (bigarray array2 (7, 8) Bigarray.int64); + (bigarray array2 (7, 8) Bigarray_compat.int64); assert_typ_printed_as "intnat[9][10]" - (bigarray array2 (9, 10) Bigarray.int); + (bigarray array2 (9, 10) Bigarray_compat.int); assert_typ_printed_as "intnat[13][14][15]" - (bigarray array3 (13, 14, 15) Bigarray.nativeint); + (bigarray array3 (13, 14, 15) Bigarray_compat.nativeint); end @@ -461,10 +461,10 @@ let test_bigarray_unsigned_printing _ = "Unsigned bigarray elements currently indistinguishable from signed elements"; begin assert_typ_printed_as "uint8_t[2]" - (bigarray array1 2 Bigarray.int8_unsigned); + (bigarray array1 2 Bigarray_compat.int8_unsigned); assert_typ_printed_as "uint16_t[4]" - (bigarray array1 4 Bigarray.int16_unsigned); + (bigarray array1 4 Bigarray_compat.int16_unsigned); end @@ -474,16 +474,16 @@ let test_bigarray_unsigned_printing _ = let test_bigarray_float_printing _ = begin assert_typ_printed_as "float[10][100]" - (bigarray genarray [|10; 100|] Bigarray.float32); + (bigarray genarray [|10; 100|] Bigarray_compat.float32); assert_typ_printed_as "double[20][30][40]" - (bigarray genarray [|20; 30; 40|] Bigarray.float64); + (bigarray genarray [|20; 30; 40|] Bigarray_compat.float64); assert_typ_printed_as "float _Complex[16][17][18]" - (bigarray array3 (16, 17, 18) Bigarray.complex32); + (bigarray array3 (16, 17, 18) Bigarray_compat.complex32); assert_typ_printed_as "double _Complex[19][20][21]" - (bigarray array3 (19, 20, 21) Bigarray.complex64); + (bigarray array3 (19, 20, 21) Bigarray_compat.complex64); end From 32a3c71d57f166256f109995eaabbf8cde15df52 Mon Sep 17 00:00:00 2001 From: Calascibetta Romain Date: Fri, 6 Nov 2020 15:36:19 +0100 Subject: [PATCH 5/5] Update examples to use bigarray-compat --- Makefile.examples | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Makefile.examples b/Makefile.examples index 89c6d2d33..dd3eb55d6 100644 --- a/Makefile.examples +++ b/Makefile.examples @@ -15,7 +15,7 @@ fts-stub-generator.threads = yes fts-stub-generator.deps = integers fts-stub-generator.subproject_deps = ctypes cstubs \ ctypes-foreign fts-stubs -fts-stub-generator.deps = str unix bigarray integers +fts-stub-generator.deps = str unix bigarray-compat integers fts-stub-generator: PROJECT=fts-stub-generator fts-stub-generator: $$(NATIVE_TARGET) @@ -24,7 +24,7 @@ fts-cmd.dir = examples/fts/stub-generation fts-cmd.threads = yes fts-cmd.subproject_deps = ctypes \ ctypes-foreign fts-stubs -fts-cmd.deps = str unix bigarray integers +fts-cmd.deps = str unix bigarray-compat integers fts-cmd.extra_mls = fts_generated.ml fts-cmd.extra_cs = fts_stubs.c fts-cmd: CFLAGS+=-D_FILE_OFFSET_BITS=32 @@ -39,7 +39,7 @@ examples/fts/stub-generation/fts_generated.ml: fts-stub-generator fts.install = no fts.dir = examples/fts/foreign fts.threads = yes -fts.deps = unix bigarray str integers +fts.deps = unix bigarray-compat str integers fts.subproject_deps = ctypes ctypes-foreign fts: PROJECT=fts fts: $$(NATIVE_TARGET) @@ -54,14 +54,14 @@ date-stubs: $$(LIB_TARGETS) date-stub-generator.install = no date-stub-generator.dir = examples/date/stub-generation/stub-generator date-stub-generator.subproject_deps = ctypes cstubs date-stubs -date-stub-generator.deps = str unix bigarray integers +date-stub-generator.deps = str unix bigarray-compat integers date-stub-generator: PROJECT=date-stub-generator date-stub-generator: $$(NATIVE_TARGET) date-cmd.install = no date-cmd.dir = examples/date/stub-generation date-cmd.subproject_deps = ctypes date-stubs -date-cmd.deps = str unix bigarray integers +date-cmd.deps = str unix bigarray-compat integers date-cmd.extra_mls = date_generated.ml date-cmd.extra_cs = date_stubs.c date-cmd: PROJECT=date-cmd @@ -76,7 +76,7 @@ date.install = no date.dir = examples/date/foreign date.threads = yes date.subproject_deps = ctypes ctypes-foreign -date.deps = unix bigarray str integers +date.deps = unix bigarray-compat str integers date: PROJECT=date date: $$(NATIVE_TARGET) @@ -84,7 +84,7 @@ date: $$(NATIVE_TARGET) ncurses-stubs.install = no ncurses-stubs.dir = examples/ncurses/stub-generation/bindings ncurses-stubs.subproject_deps = ctypes -ncurses-stubs.deps = str unix bigarray integers +ncurses-stubs.deps = str unix bigarray-compat integers ncurses-stubs: PROJECT=ncurses-stubs ncurses-stubs: $$(NATIVE_TARGET) $$(LIB_TARGETS) @@ -94,14 +94,14 @@ ncurses-stub-generator.threads = yes ncurses-stub-generator.deps = integers ncurses-stub-generator.subproject_deps = ctypes cstubs \ ctypes-foreign ncurses-stubs -ncurses-stub-generator.deps = str unix bigarray integers +ncurses-stub-generator.deps = str unix bigarray-compat integers ncurses-stub-generator: PROJECT=ncurses-stub-generator ncurses-stub-generator: $$(NATIVE_TARGET) ncurses-cmd.install = no ncurses-cmd.dir = examples/ncurses/stub-generation ncurses-cmd.subproject_deps = ctypes ncurses-stubs -ncurses-cmd.deps = str unix bigarray integers +ncurses-cmd.deps = str unix bigarray-compat integers ncurses-cmd.extra_mls = ncurses_generated.ml ncurses-cmd.extra_cs = ncurses_stubs.c ncurses-cmd.link_flags = -lncurses @@ -117,7 +117,7 @@ ncurses.install = no ncurses.dir = examples/ncurses/foreign ncurses.threads = yes ncurses.subproject_deps = ctypes ctypes-foreign -ncurses.deps = unix bigarray str integers +ncurses.deps = unix bigarray-compat str integers ncurses.link_flags = -lncurses ncurses: PROJECT=ncurses ncurses: $$(NATIVE_TARGET)