Delete the deprecated Bigarray.*.map_file functions
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>master
parent
7bd3162313
commit
8d8df4e1d8
5
Changes
5
Changes
|
@ -250,6 +250,11 @@ OCaml 4.08.0
|
|||
Make (nat)dynlink sound
|
||||
(Mark Shinwell, Leo White, Nicolás Ojeda Bär, Pierre Chambart)
|
||||
|
||||
- GPR#2263: Delete the deprecated Bigarray.*.map_file functions in
|
||||
favour of `*_of_genarray (Unix.map_file ...)` functions instead. The
|
||||
`Unix.map_file` function was introduced in OCaml 4.06.0 onwards.
|
||||
(Jérémie Dimino, reviewed by David Allsopp and Anil Madhavapeddy)
|
||||
|
||||
### Compiler user-interface and warnings:
|
||||
|
||||
- GPR#2133: Warn on literal patterns found anywhere in a constructor's
|
||||
|
|
|
@ -14,22 +14,10 @@
|
|||
#**************************************************************************
|
||||
|
||||
LIBNAME=bigarray
|
||||
EXTRACFLAGS=-I../$(UNIXLIB) -DIN_OCAML_BIGARRAY
|
||||
EXTRACAMLFLAGS=-I ../$(UNIXLIB)
|
||||
COBJS=mmap_ba.$(O) mmap.$(O)
|
||||
CAMLOBJS=bigarray.cmo
|
||||
|
||||
include ../Makefile.otherlibs.common
|
||||
|
||||
ifeq "$(SYSTEM)" "mingw"
|
||||
LDOPTS=-ldopt "-link -static-libgcc"
|
||||
endif
|
||||
|
||||
mmap.$(O): ../$(UNIXLIB)/mmap.c
|
||||
$(CC) -c $(OC_CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $<
|
||||
mmap_ba.$(O): ../unix/mmap_ba.c
|
||||
$(CC) -c $(OC_CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $<
|
||||
|
||||
.PHONY: depend
|
||||
|
||||
depend:
|
||||
|
|
|
@ -12,40 +12,4 @@
|
|||
(* *)
|
||||
(**************************************************************************)
|
||||
|
||||
module Super = Stdlib.Bigarray
|
||||
|
||||
include (Super : module type of struct include Super end
|
||||
with module Genarray := Super.Genarray
|
||||
with module Array1 := Super.Array1
|
||||
with module Array2 := Super.Array2
|
||||
with module Array3 := Super.Array3)
|
||||
|
||||
module Genarray = struct
|
||||
include Super.Genarray
|
||||
external map_internal: Unix.file_descr -> ('a, 'b) kind -> 'c layout ->
|
||||
bool -> int array -> int64 -> ('a, 'b, 'c) t
|
||||
= "caml_ba_map_file_bytecode" "caml_ba_map_file"
|
||||
let map_file fd ?(pos = 0L) kind layout shared dims =
|
||||
map_internal fd kind layout shared dims pos
|
||||
end
|
||||
|
||||
module Array1 = struct
|
||||
include Super.Array1
|
||||
let map_file fd ?pos kind layout shared dim =
|
||||
array1_of_genarray
|
||||
(Genarray.map_file fd ?pos kind layout shared [|dim|])
|
||||
end
|
||||
|
||||
module Array2 = struct
|
||||
include Super.Array2
|
||||
let map_file fd ?pos kind layout shared dim1 dim2 =
|
||||
array2_of_genarray
|
||||
(Genarray.map_file fd ?pos kind layout shared [|dim1;dim2|])
|
||||
end
|
||||
|
||||
module Array3 = struct
|
||||
include Super.Array3
|
||||
let map_file fd ?pos kind layout shared dim1 dim2 dim3 =
|
||||
array3_of_genarray
|
||||
(Genarray.map_file fd ?pos kind layout shared [|dim1;dim2;dim3|])
|
||||
end
|
||||
include Stdlib.Bigarray
|
||||
|
|
|
@ -13,48 +13,3 @@
|
|||
(**************************************************************************)
|
||||
|
||||
include module type of struct include Stdlib.Bigarray end
|
||||
with module Genarray := Stdlib.Bigarray.Genarray
|
||||
with module Array1 := Stdlib.Bigarray.Array1
|
||||
with module Array2 := Stdlib.Bigarray.Array2
|
||||
with module Array3 := Stdlib.Bigarray.Array3
|
||||
|
||||
module Genarray : sig
|
||||
include module type of struct include Stdlib.Bigarray.Genarray end
|
||||
val map_file:
|
||||
Unix.file_descr -> ?pos:int64 -> ('a, 'b) kind -> 'c layout ->
|
||||
bool -> int array -> ('a, 'b, 'c) t
|
||||
[@@ocaml.deprecated "\
|
||||
Use Unix.map_file instead.\n\
|
||||
Note that Bigarray.Genarray.map_file raises Sys_error while\n\
|
||||
Unix.map_file raises Unix_error."]
|
||||
end
|
||||
|
||||
module Array1 : sig
|
||||
include module type of struct include Stdlib.Bigarray.Array1 end
|
||||
val map_file: Unix.file_descr -> ?pos:int64 -> ('a, 'b) kind -> 'c layout ->
|
||||
bool -> int -> ('a, 'b, 'c) t
|
||||
[@@ocaml.deprecated "\
|
||||
Use [array1_of_genarray (Unix.map_file ...)] instead.\n\
|
||||
Note that Bigarray.Array1.map_file raises Sys_error while\n\
|
||||
Unix.map_file raises Unix_error."]
|
||||
end
|
||||
|
||||
module Array2 : sig
|
||||
include module type of struct include Stdlib.Bigarray.Array2 end
|
||||
val map_file: Unix.file_descr -> ?pos:int64 -> ('a, 'b) kind -> 'c layout ->
|
||||
bool -> int -> int -> ('a, 'b, 'c) t
|
||||
[@@ocaml.deprecated "\
|
||||
Use [array2_of_genarray (Unix.map_file ...)] instead.\n\
|
||||
Note that Bigarray.Array2.map_file raises Sys_error while\n\
|
||||
Unix.map_file raises Unix_error."]
|
||||
end
|
||||
|
||||
module Array3 : sig
|
||||
include module type of struct include Stdlib.Bigarray.Array3 end
|
||||
val map_file: Unix.file_descr -> ?pos:int64 -> ('a, 'b) kind -> 'c layout ->
|
||||
bool -> int -> int -> int -> ('a, 'b, 'c) t
|
||||
[@@ocaml.deprecated "\
|
||||
Use [array3_of_genarray (Unix.map_file ...)] instead.\n\
|
||||
Note that Bigarray.Array3.map_file raises Sys_error while\n\
|
||||
Unix.map_file raises Unix_error."]
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue