summaryrefslogtreecommitdiff
path: root/stdlib/hashtbl.ml
diff options
context:
space:
mode:
authorJun FURUSE / 古瀬 淳 <jun.furuse@gmail.com>2004-06-18 05:04:14 +0000
committerJun FURUSE / 古瀬 淳 <jun.furuse@gmail.com>2004-06-18 05:04:14 +0000
commit5e1bf20850aaa9b1ceb86a971848609ee9e84c47 (patch)
treef3a6e5b5c38263fe527e6275ff95425f12637226 /stdlib/hashtbl.ml
parent8ec769214e067da9ee8b33d05f4ef275e9269dd5 (diff)
downloadocaml-gcaml.tar.gz
port to the latest ocaml (2004/06/18)gcaml
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gcaml@6419 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'stdlib/hashtbl.ml')
-rw-r--r--stdlib/hashtbl.ml6
1 files changed, 6 insertions, 0 deletions
diff --git a/stdlib/hashtbl.ml b/stdlib/hashtbl.ml
index 0169f747ae..225aa6be78 100644
--- a/stdlib/hashtbl.ml
+++ b/stdlib/hashtbl.ml
@@ -44,6 +44,8 @@ let copy h =
{ size = h.size;
data = Array.copy h.data }
+let length h = h.size
+
let resize hashfun tbl =
let odata = tbl.data in
let osize = Array.length odata in
@@ -184,6 +186,7 @@ module type S =
val mem : 'a t -> key -> bool
val iter: (key -> 'a -> unit) -> 'a t -> unit
val fold: (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
+ val length: 'a t -> int
end
module Make(H: HashedType): (S with type key = H.t) =
@@ -272,4 +275,7 @@ module Make(H: HashedType): (S with type key = H.t) =
let iter = iter
let fold = fold
+ let length = length
end
+
+(* eof $Id$ *)