summaryrefslogtreecommitdiffstats
path: root/testsuite/tests/lib-dynlink-bytecode/registry.ml
blob: 46915a1bfd6eb84d356cf05623640c4e8beb7575 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
(***********************************************************************)
(*                                                                     *)
(*                                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