From d170d27ef912f97c29d16e7e4c130ae34e926678 Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Thu, 16 Jan 2025 13:19:13 +0100 Subject: [PATCH] Runtime: keep caml_string_of_array For_compatibility_only --- lib/runtime/js_of_ocaml_runtime_stubs.c | 4 ++++ lib/runtime/jsoo_runtime.ml | 2 ++ 2 files changed, 6 insertions(+) diff --git a/lib/runtime/js_of_ocaml_runtime_stubs.c b/lib/runtime/js_of_ocaml_runtime_stubs.c index 244378350f..4e9ad9bd29 100644 --- a/lib/runtime/js_of_ocaml_runtime_stubs.c +++ b/lib/runtime/js_of_ocaml_runtime_stubs.c @@ -256,6 +256,10 @@ void caml_read_file_content () { caml_fatal_error("Unimplemented Javascript primitive caml_read_file_content!"); } +void caml_string_of_array () { + caml_fatal_error("Unimplemented Javascript primitive caml_string_of_array!"); +} + void caml_string_of_jsbytes () { caml_fatal_error("Unimplemented Javascript primitive caml_string_of_jsbytes!"); } diff --git a/lib/runtime/jsoo_runtime.ml b/lib/runtime/jsoo_runtime.ml index ffde82958f..c69b5b4937 100644 --- a/lib/runtime/jsoo_runtime.ml +++ b/lib/runtime/jsoo_runtime.ml @@ -202,6 +202,8 @@ module For_compatibility_only = struct external caml_list_to_js_array : 'a list -> 'a Js.js_array = "caml_list_to_js_array" external variable : string -> 'a = "caml_js_var" + + external caml_string_of_array : 'a array -> string = "caml_string_of_array" end module Typed_array = struct