X-Git-Url: https://git.hcoop.net/bpt/coccinelle.git/blobdiff_plain/f537ebc4bbd27866c9ac3e1198b6756ebab7f2ba..97111a47d707638a835d7498276ac6768a052ee8:/globals/iteration.ml diff --git a/globals/iteration.ml b/globals/iteration.ml index 0dc76b8..5d135b6 100644 --- a/globals/iteration.ml +++ b/globals/iteration.ml @@ -48,7 +48,14 @@ let add_pending_instance (files,a,b) = pending_instances_dir := (!base_file_list,a,b) :: !pending_instances_dir | Some f -> (* if one specifies a file, it is assumed to be the current one *) - pending_instances_file := (f,a,b) :: !pending_instances_file + (* put at the end of the list of information about this file *) + let rec loop = function + [] -> [(f,a,b)] + | ((f1,a1,b1) as front)::rest -> + if f = f1 + then front :: (loop rest) + else (f,a,b) :: front :: rest in + pending_instances_file := loop !pending_instances_file let get_pending_instance _ = (if (List.length !pending_instances_file) > 0 or