Displaying 2 results from an estimated 2 matches for "itersubkey".
2014 Jan 21
3
[PATCH] builder: proper consider subkeys in index files
...rue
) 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...
2014 Jan 21
2
Re: [PATCH] builder: proper consider subkeys in index files
...s I've read.
> > 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 =
> &...