Commit c1c4266d authored by François Bobot's avatar François Bobot

hashweak : use merge instead of add, it doesn't duplicate elements

parent 0b6ec4df
......@@ -143,7 +143,7 @@ module Make (S : Weakey) = struct
let set (t : 'a t) k (v : 'a) =
Hashtbl.replace (tag_map k) t.tbl_tag (Obj.repr v);
H.add t.tbl_set k
ignore (H.merge t.tbl_set k)
let remove t k =
Hashtbl.remove (tag_map k) t.tbl_tag;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment