diff --git a/lib/plugins/server/bslClientEvent.ml b/lib/plugins/server/bslClientEvent.ml index e01a0dc2..ba90e4d2 100644 --- a/lib/plugins/server/bslClientEvent.ml +++ b/lib/plugins/server/bslClientEvent.ml @@ -34,7 +34,7 @@ let inactive = BslPingRegister.M.Inactive [BslPingRegister.Client.key]. Used by [register_event] below. *) (* ************************************************************************** *) external opa_tc_c_2_bsl_pr_c_k : - BslNet.opa_threadcontext_client -> BslPingRegister.Client.key = + BslUtils.opa_threadcontext_client -> BslPingRegister.Client.key = "%identity" (* ************************************************************************** *) @@ -42,7 +42,7 @@ external opa_tc_c_2_bsl_pr_c_k : [BslUtils.opa_threadcontext_client]. Used by [register_event] below. *) (* ************************************************************************** *) external bsl_pr_c_k_2_opa_tc_c : - BslPingRegister.Client.key -> BslNet.opa_threadcontext_client = + BslPingRegister.Client.key -> BslUtils.opa_threadcontext_client = "%identity" module Ping = BslPingRegister.M diff --git a/lib/plugins/server/bslDispatcher.ml b/lib/plugins/server/bslDispatcher.ml index 4aea5167..c81a9ef8 100644 --- a/lib/plugins/server/bslDispatcher.ml +++ b/lib/plugins/server/bslDispatcher.ml @@ -17,7 +17,6 @@ open HttpServer open Cps.Ops -module BslUtils = OpabslMLRuntime.BslUtils module Client = BslPingRegister.Client module Ping = BslPingRegister.M module WebChannel = Session.WebChannel diff --git a/lib/plugins/server/bslNet.ml b/lib/plugins/server/bslNet.ml index ba366587..1d7993f5 100644 --- a/lib/plugins/server/bslNet.ml +++ b/lib/plugins/server/bslNet.ml @@ -12,7 +12,7 @@ module List = BaseList module HSCp = HttpServerCore_parse -module BslNativeLib = OpabslMLRuntime.BslNativeLib +module BslNativeLib = BslUtils (* The opa scheduler *) let default_scheduler = BslScheduler.opa @@ -25,21 +25,10 @@ let default_scheduler = BslScheduler.opa ##extern-type binary = Buffer.t ##property[endmli] -##opa-type list('a) -##opa-type tuple_2('a, 'b) -##opa-type tuple_3('a, 'b, 'c) -##opa-type ThreadContext.t -##opa-type ThreadContext.client - -let caml_list_to_opa_list f l = - wrap_opa_list (BslNativeLib.unwrap_opa_list (BslNativeLib.caml_list_to_opa_list f l)) -let opa_tuple_2 t = - wrap_opa_tuple_2 (BslNativeLib.unwrap_opa_tuple_2 (BslNativeLib.opa_tuple_2 t)) -let opa_tuple_3 t = - wrap_opa_tuple_3 (BslNativeLib.unwrap_opa_tuple_3 (BslNativeLib.opa_tuple_3 t)) -let opa_list_to_ocaml_list f l = - BslNativeLib.opa_list_to_ocaml_list f - (BslNativeLib.wrap_opa_list (unwrap_opa_list l)) +let caml_list_to_opa_list = BslNativeLib.caml_list_to_opa_list +let opa_tuple_2 = BslNativeLib.opa_tuple_2 +let opa_tuple_3 = BslNativeLib.opa_tuple_3 +let opa_list_to_ocaml_list = BslNativeLib.opa_list_to_ocaml_list (** *****************************) ##extern-type web_server_status = Requestdef.status diff --git a/lib/plugins/server/bslRPC.ml b/lib/plugins/server/bslRPC.ml index 7ccf751c..4d93bdc9 100644 --- a/lib/plugins/server/bslRPC.ml +++ b/lib/plugins/server/bslRPC.ml @@ -63,7 +63,7 @@ end = struct try let k = Hashtbl.find rpc_ids id in Hashtbl.remove rpc_ids id ; - let exc = OpabslMLRuntime.BslNativeLib.OpaExc.OpaRPC.timeout cid fun_id in + let exc = BslUtils.OpaExc.OpaRPC.timeout cid fun_id in let k_exc = QmlCpsServerLib.handler_cont k in QmlCpsServerLib.push_cont k_exc exc with diff --git a/lib/plugins/server/bslScheduler.ml b/lib/plugins/server/bslScheduler.ml index 5d7e4b0a..86cc7a5b 100644 --- a/lib/plugins/server/bslScheduler.ml +++ b/lib/plugins/server/bslScheduler.ml @@ -17,8 +17,6 @@ ##extern-type Scheduler.key = Scheduler.async_key -module BslUtils = OpabslMLRuntime.BslUtils - let opa = Scheduler.default let push f = Scheduler.push opa f diff --git a/lib/plugins/server/bslUtils.ml b/lib/plugins/server/bslUtils.ml new file mode 120000 index 00000000..5e79c0be --- /dev/null +++ b/lib/plugins/server/bslUtils.ml @@ -0,0 +1 @@ +../opabsl/mlbsl/bslUtils.ml \ No newline at end of file diff --git a/lib/plugins/server/server.opa_plugin b/lib/plugins/server/server.opa_plugin index 1dd9c880..d0131368 100644 --- a/lib/plugins/server/server.opa_plugin +++ b/lib/plugins/server/server.opa_plugin @@ -1,3 +1,4 @@ +bslUtils.ml bslScheduler.ml bslScheduler.js bslScheduler.nodejs @@ -13,7 +14,6 @@ bslMinJs.ml bslPingRegister.ml bslRPC.ml bslInit.ml -bslClientCode.ml bslClientEvent.ml bslIdentGen.ml bslServer_event.ml diff --git a/lib/plugins/server/session.ml b/lib/plugins/server/session.ml index a43084e6..1ad5042d 100644 --- a/lib/plugins/server/session.ml +++ b/lib/plugins/server/session.ml @@ -11,8 +11,6 @@ *) # -module BslUtils = OpabslMLRuntime.BslUtils - (**********************************************************) (* Alias **************************************************) open Cps.Ops