From 57efd4e25db3d10ce6c36b428be7614de7076286 Mon Sep 17 00:00:00 2001 From: letouzey Date: Thu, 5 Jul 2012 22:52:22 +0000 Subject: Extraction: Hashtbl.replace uses less ressources than Hashtbl.add (fix #2824) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@15525 85f007b7-540e-0410-9357-904b9bb8a0f7 --- plugins/extraction/common.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/extraction/common.ml') diff --git a/plugins/extraction/common.ml b/plugins/extraction/common.ml index 0f0b902c3..6af939c19 100644 --- a/plugins/extraction/common.ml +++ b/plugins/extraction/common.ml @@ -199,7 +199,7 @@ let empty_env () = [], get_global_ids () let mktable autoclean = let h = Hashtbl.create 97 in if autoclean then register_cleanup (fun () -> Hashtbl.clear h); - (Hashtbl.add h, Hashtbl.find h, fun () -> Hashtbl.clear h) + (Hashtbl.replace h, Hashtbl.find h, fun () -> Hashtbl.clear h) (* We might have built [global_reference] whose canonical part is inaccurate. We must hence compare only the user part, -- cgit v1.2.3