From b798ac29c37299b2f761243ae92ab8f7c4c4d7f1 Mon Sep 17 00:00:00 2001 From: Paweł Dybiec Date: Tue, 30 Oct 2018 15:32:56 +0100 Subject: Initial commit --- source/xi_lib/plugin_register.ml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 source/xi_lib/plugin_register.ml (limited to 'source/xi_lib/plugin_register.ml') diff --git a/source/xi_lib/plugin_register.ml b/source/xi_lib/plugin_register.ml new file mode 100644 index 0000000..da7e8a6 --- /dev/null +++ b/source/xi_lib/plugin_register.ml @@ -0,0 +1,16 @@ +open Plugin + +let register = ref [] + +let current_file = ref "" + +let register_plugin plugin = + register := (!current_file, plugin) :: !register + +module RegisterPlugin(P:PLUGIN) = struct + + let handle = (module P : PLUGIN) + + let () = register_plugin handle + +end \ No newline at end of file -- cgit 1.4.1