diff options
author | Enrico Tassi <Enrico.Tassi@inria.fr> | 2014-10-08 17:28:18 +0200 |
---|---|---|
committer | Enrico Tassi <Enrico.Tassi@inria.fr> | 2014-10-13 18:13:20 +0200 |
commit | 7cfcaa57a68ea9abde9e2558ceef86589aa26d6d (patch) | |
tree | 4a6b0795b7a4408b0651d34146329495b423ff29 /lib/remoteCounter.ml | |
parent | e3a0a4d58b74d2113485ceabe4235567fda962c8 (diff) |
STM: primitives to snapshot a .vi while in interactive mode
Diffstat (limited to 'lib/remoteCounter.ml')
-rw-r--r-- | lib/remoteCounter.ml | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/remoteCounter.ml b/lib/remoteCounter.ml index 72887b21a..c0217b22e 100644 --- a/lib/remoteCounter.ml +++ b/lib/remoteCounter.ml @@ -37,6 +37,9 @@ let new_counter ~name a ~incr ~build = let backup () = !counters +let snapshot () = + List.map (fun (n,v) -> n, Obj.repr (ref (ref !!(Obj.obj v)))) !counters + let restore l = List.iter (fun (name, data) -> assert(List.mem_assoc name !counters); |