ocaml/test/natdynlink/plugin_ref.ml

12 lines
163 B
OCaml

let x = ref 0
let () =
Api.reg_mod "Plugin_ref";
Api.add_cb
(fun () ->
Printf.printf "current value for ref = %i\n" !x;
incr x
)