Displaying 2 results from an estimated 2 matches for "itervalue".
2014 Jan 21
3
[PATCH] builder: proper consider subkeys in index files
...) fields
) sections;
@@ -162,25 +163,32 @@ let get_index ~prog ~debug ~downloader ~sigchecker source =
let entries =
List.map (
fun (n, fields) ->
+ let find_elem key subkey fields =
+ match List.filter (
+ fun (iterkey, itersubkey, itervalue) ->
+ iterkey = key && itersubkey = subkey
+ ) fields with
+ | [] -> raise Not_found
+ | (_, _, value) :: _ -> value in
let printable_name =
- try Some (List.assoc "name" fields) with Not_found ->...
2014 Jan 21
2
Re: [PATCH] builder: proper consider subkeys in index files
...ead.
> > let entries =
> >
> > List.map (
> >
> > fun (n, fields) ->
> >
> > + let find_elem key subkey fields =
> > + match List.filter (
> > + fun (iterkey, itersubkey, itervalue) ->
> > + iterkey = key && itersubkey = subkey
> > + ) fields with
> > + | [] -> raise Not_found
> > + | (_, _, value) :: _ -> value in
> >
> > let printable_name =
> >
> &...