From c56f7bc6c5590f057d2149934034eca2e35a811d Mon Sep 17 00:00:00 2001 From: Stefano Zacchiroli Date: Thu, 6 Oct 2005 09:37:32 +0000 Subject: [PATCH] bugfix: multiple bindings of the same key work again --- helm/ocaml/registry/helm_registry.ml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) 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 = -- 2.39.2