Skip to content
Snippets Groups Projects
Commit 9160209f authored by Loïc Correnson's avatar Loïc Correnson Committed by Allan Blanchard
Browse files

[kernel] annotations update hook

parent 615572ed
No related branches found
No related tags found
No related merge requests found
...@@ -155,6 +155,19 @@ let () = ...@@ -155,6 +155,19 @@ let () =
let kf = find_englobing_kf stmt in let kf = find_englobing_kf stmt in
List.iter (fun a -> clear_linked_to_annot kf stmt e a) !l) List.iter (fun a -> clear_linked_to_annot kf stmt e a) !l)
let add_hook_on_change f =
begin
let notify _ _ _ = f () in
Globals.add_hook_on_update notify ;
Globals.add_hook_on_remove notify ;
Model_fields.add_hook_on_update notify ;
Model_fields.add_hook_on_remove notify ;
Funspecs.add_hook_on_update notify ;
Funspecs.add_hook_on_remove notify ;
Code_annots.add_hook_on_update notify ;
Code_annots.add_hook_on_remove notify ;
end
(**************************************************************************) (**************************************************************************)
(** {2 Getting annotations} *) (** {2 Getting annotations} *)
(**************************************************************************) (**************************************************************************)
......
...@@ -30,6 +30,10 @@ open Cil_types ...@@ -30,6 +30,10 @@ open Cil_types
(** {2 Getting annotations} *) (** {2 Getting annotations} *)
(**************************************************************************) (**************************************************************************)
val add_hook_on_change: (unit -> unit) -> unit
(** Emitted whenever anhy of the annotation tables are modified.
@since Frama-C+dev *)
(**************************************************************************) (**************************************************************************)
(** {3 Code annotations} *) (** {3 Code annotations} *)
(**************************************************************************) (**************************************************************************)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment