ocaml/testsuite/tests/lib-dynlink-bytecode/registry.ml

20 lines
945 B
OCaml

(***********************************************************************)
(* *)
(* OCaml *)
(* *)
(* Xavier Leroy, projet Gallium, INRIA Rocquencourt *)
(* *)
(* Copyright 2012 Institut National de Recherche en Informatique et *)
(* en Automatique. All rights reserved. This file is distributed *)
(* under the terms of the Q Public License version 1.0. *)
(* *)
(***********************************************************************)
let functions = ref ([]: (int -> int) list)
let register f =
functions := f :: !functions
let get_functions () =
!functions