diff options
author | Alain Frisch <alain@frisch.fr> | 2016-03-10 14:42:36 +0100 |
---|---|---|
committer | Alain Frisch <alain@frisch.fr> | 2016-03-10 15:10:47 +0100 |
commit | af09eacaf2d651ba5b28394b15db8f54d150aca4 (patch) | |
tree | 01f9af2ff5afcde00cc136dc38c5b354133555a8 | |
parent | 0310ff44155513ee944e64cbd54c6d5c46153d59 (diff) | |
download | ocaml-af09eacaf2d651ba5b28394b15db8f54d150aca4.tar.gz |
Bug fix: Hashtbl.filter_map_inplace did not correctly update the size field.
-rw-r--r-- | stdlib/hashtbl.ml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/stdlib/hashtbl.ml b/stdlib/hashtbl.ml index 59e41712fc..955f63845d 100644 --- a/stdlib/hashtbl.ml +++ b/stdlib/hashtbl.ml @@ -200,7 +200,7 @@ let filter_map_inplace f h = Empty | Cons(k, d, rest) -> match f k d with - | None -> do_bucket rest + | None -> h.size <- h.size - 1; do_bucket rest | Some new_d -> Cons(k, new_d, do_bucket rest) in let d = h.data in |