Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
frama-c
Commits
9160209f
Commit
9160209f
authored
1 year ago
by
Loïc Correnson
Committed by
Allan Blanchard
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
[kernel] annotations update hook
parent
615572ed
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/kernel_services/ast_data/annotations.ml
+13
-0
13 additions, 0 deletions
src/kernel_services/ast_data/annotations.ml
src/kernel_services/ast_data/annotations.mli
+4
-0
4 additions, 0 deletions
src/kernel_services/ast_data/annotations.mli
with
17 additions
and
0 deletions
src/kernel_services/ast_data/annotations.ml
+
13
−
0
View file @
9160209f
...
@@ -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} *)
(**************************************************************************)
(**************************************************************************)
...
...
This diff is collapsed.
Click to expand it.
src/kernel_services/ast_data/annotations.mli
+
4
−
0
View file @
9160209f
...
@@ -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} *)
(**************************************************************************)
(**************************************************************************)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment