From: Stefano Zacchiroli Date: Thu, 6 Oct 2005 09:37:32 +0000 (+0000) Subject: bugfix: multiple bindings of the same key work again X-Git-Tag: V_0_7_2_3~241 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=c56f7bc6c5590f057d2149934034eca2e35a811d;p=helm.git bugfix: multiple bindings of the same key work again --- diff --git a/helm/ocaml/registry/helm_registry.ml b/helm/ocaml/registry/helm_registry.ml index 78d8cda5f..d1f4b1f92 100644 --- a/helm/ocaml/registry/helm_registry.ml +++ b/helm/ocaml/registry/helm_registry.ml @@ -117,13 +117,10 @@ let key_is_valid key = if not (Str.string_match valid_key_rex key 0) then raise (Malformed_key key) -let set' ?(replace=true) registry ~key ~value = +let set' registry ~key ~value = debug_print (lazy (sprintf "Setting %s = %s" key value)); key_is_valid key; - if replace then - Hashtbl.replace registry key value - else - Hashtbl.add registry key value + Hashtbl.add registry key value let unset registry = Hashtbl.remove registry @@ -205,7 +202,7 @@ let get_pair registry fst_unmarshaller snd_unmarshaller key = let set_list registry marshaller ~key ~value = List.iter - (fun v -> set ~replace:false registry ~key ~value:(marshaller v)) + (fun v -> set registry ~key ~value:(marshaller v)) value type xml_tree =