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
52509dd2
Commit
52509dd2
authored
3 years ago
by
Valentin Perrelle
Committed by
David Bühler
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[Server] Syncvalues and SyncStates hooks can now accept any argument
parent
d84cc575
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/plugins/server/states.ml
+3
-3
3 additions, 3 deletions
src/plugins/server/states.ml
src/plugins/server/states.mli
+2
-2
2 additions, 2 deletions
src/plugins/server/states.mli
with
5 additions
and
5 deletions
src/plugins/server/states.ml
+
3
−
3
View file @
52509dd2
...
...
@@ -37,7 +37,7 @@ let install signal hook = function
in
Request
.
on_signal
signal
install
let
install_emit
signal
add_hook
=
install
signal
(
fun
()
->
Request
.
emit
signal
)
add_hook
install
signal
(
fun
_
->
Request
.
emit
signal
)
add_hook
(* -------------------------------------------------------------------------- *)
(* --- Values --- *)
...
...
@@ -45,7 +45,7 @@ let install_emit signal add_hook =
let
register_value
(
type
a
)
~
package
~
name
~
descr
~
(
output
:
a
Request
.
output
)
~
get
?
(
add_hook
:
unit
callback
option
)
()
?
(
add_hook
:
'
b
callback
option
)
()
=
let
open
Markdown
in
let
href
=
link
~
name
()
in
...
...
@@ -68,7 +68,7 @@ let register_value (type a) ~package ~name ~descr
let
register_state
(
type
a
)
~
package
~
name
~
descr
~
(
data
:
a
data
)
~
get
~
set
?
(
add_hook
:
unit
callback
option
)
()
=
?
(
add_hook
:
'
b
callback
option
)
()
=
let
open
Markdown
in
let
module
D
=
(
val
data
)
in
let
href
=
link
~
name
()
in
...
...
This diff is collapsed.
Click to expand it.
src/plugins/server/states.mli
+
2
−
2
View file @
52509dd2
...
...
@@ -44,7 +44,7 @@ val register_value :
descr
:
Markdown
.
text
->
output
:
'
a
Request
.
output
->
get
:
(
unit
->
'
a
)
->
?
add_hook
:
(
unit
callback
)
->
?
add_hook
:
(
'
b
callback
)
->
unit
->
Request
.
signal
(** Register a (projectified) state and generates the associated signal and
...
...
@@ -67,7 +67,7 @@ val register_state :
data
:
'
a
Data
.
data
->
get
:
(
unit
->
'
a
)
->
set
:
(
'
a
->
unit
)
->
?
add_hook
:
(
unit
callback
)
->
?
add_hook
:
(
'
b
callback
)
->
unit
->
Request
.
signal
type
'
a
model
(** Columns array model *)
...
...
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