aboutsummaryrefslogtreecommitdiffhomepage
path: root/plugins/micromega
diff options
context:
space:
mode:
authorGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2017-12-05 18:42:05 +0100
committerGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2017-12-05 18:56:09 +0100
commit8392aa24c18a3b8aa64e2bb40470d84209f68aa3 (patch)
tree803e3f9ee7e96d85796a9234cd2dbe80805451ed /plugins/micromega
parent0048cbe810c82a775558c14cd7fcae644e205c51 (diff)
Replacing Hashtbl.add by Hashtbl.replace in micromega cache building.
This fixes #6286 as suggested by PMP. See details of discussion at #6286.
Diffstat (limited to 'plugins/micromega')
-rw-r--r--plugins/micromega/persistent_cache.ml4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/micromega/persistent_cache.ml b/plugins/micromega/persistent_cache.ml
index 49ccb468c..387a52514 100644
--- a/plugins/micromega/persistent_cache.ml
+++ b/plugins/micromega/persistent_cache.ml
@@ -149,7 +149,7 @@ let open_in f =
match read_key_elem inch with
| None -> ()
| Some (key,elem) ->
- Table.add htbl key elem ;
+ Table.replace htbl key elem ;
xload () in
try
(* Locking of the (whole) file while reading *)
@@ -195,7 +195,7 @@ let add t k e =
else
let fd = descr_of_out_channel outch in
begin
- Table.add tbl k e ;
+ Table.replace tbl k e ;
do_under_lock Write fd
(fun _ ->
Marshal.to_channel outch (k,e) [Marshal.No_sharing] ;