diff --git a/core/CCVector.ml b/core/CCVector.ml index e9675f23..c7f4b9f2 100644 --- a/core/CCVector.ml +++ b/core/CCVector.ml @@ -86,7 +86,7 @@ let _empty_array v = let _resize v newcapacity = assert (newcapacity >= v.size); assert (not (_empty_array v)); - let new_vec = Array.create newcapacity v.vec.(0) in + let new_vec = Array.make newcapacity v.vec.(0) in Array.blit v.vec 0 new_vec 0 v.size; v.vec <- new_vec; () diff --git a/misc/automaton.ml b/misc/automaton.ml index 53748039..c761fb0a 100644 --- a/misc/automaton.ml +++ b/misc/automaton.ml @@ -92,7 +92,7 @@ module O = struct let create () = let s = { n = 0; - handlers = Array.create 3 nop_handler; + handlers = Array.make 3 nop_handler; alive = NotAlive; } in s @@ -116,7 +116,7 @@ module O = struct (* resize handlers if needed *) (if s.n = Array.length s.handlers then begin - let handlers = Array.create (s.n + 4) nop_handler in + let handlers = Array.make (s.n + 4) nop_handler in Array.blit s.handlers 0 handlers 0 s.n; s.handlers <- handlers end); diff --git a/misc/cache.ml b/misc/cache.ml index 4f9a94f5..bbf59d3c 100644 --- a/misc/cache.ml +++ b/misc/cache.ml @@ -116,7 +116,7 @@ module Linear(X : EQ) = struct let create size = assert (size >= 1); - Array.create size Empty + Array.make size Empty let clear cache = Array.fill cache 0 (Array.length cache) Empty @@ -164,7 +164,7 @@ module Linear2(X : EQ)(Y : EQ) = struct let create size = assert (size >= 1); - Array.create size Empty + Array.make size Empty let clear cache = Array.fill cache 0 (Array.length cache) Empty @@ -214,7 +214,7 @@ module Replacing(X : HASH) = struct and 'a bucket = Empty | Assoc of key * 'a | AssocRaise of key * exn let create size = - Array.create size Empty + Array.make size Empty let clear c = Array.fill c 0 (Array.length c) Empty @@ -256,7 +256,7 @@ module Replacing2(X : HASH)(Y : HASH) = struct and key2 = Y.t let create size = - Array.create size Empty + Array.make size Empty let clear c = Array.fill c 0 (Array.length c) Empty diff --git a/misc/fHashtbl.ml b/misc/fHashtbl.ml index 50e4c8a7..fe1b3ea2 100644 --- a/misc/fHashtbl.ml +++ b/misc/fHashtbl.ml @@ -80,7 +80,7 @@ module PArray = struct (* XXX maybe having a snapshot of the array from point to point may help? *) let make size elt = - let a = Array.create size elt in + let a = Array.make size elt in ref (Array a) (** Recover the given version of the shared array. Returns the array diff --git a/misc/puf.ml b/misc/puf.ml index 7a00564a..d41e637f 100644 --- a/misc/puf.ml +++ b/misc/puf.ml @@ -36,7 +36,7 @@ module PArray = struct (* XXX maybe having a snapshot of the array from point to point may help? *) let make size elt = - let a = Array.create size elt in + let a = Array.make size elt in ref (Array a) let init size f = diff --git a/misc/tTree.ml b/misc/tTree.ml index 538432c0..034f91d9 100644 --- a/misc/tTree.ml +++ b/misc/tTree.ml @@ -40,7 +40,7 @@ module PArray = struct (* XXX maybe having a snapshot of the array from point to point may help? *) let make size elt = - let a = Array.create size elt in + let a = Array.make size elt in ref (Array a) (** Recover the given version of the shared array. Returns the array