From 9c9e1d0273fdaeaf839d40e2182fbcc8197613ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Ojeda=20B=C3=A4r?= Date: Mon, 3 Feb 2025 14:45:21 +0100 Subject: [PATCH] dtoa_stubs.js: rename caml_new_string to caml_string_of_jsbytes to avoid deprecation warning --- js/dtoa_stubs.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/js/dtoa_stubs.js b/js/dtoa_stubs.js index 795ecc6..2ee9631 100644 --- a/js/dtoa_stubs.js +++ b/js/dtoa_stubs.js @@ -6,21 +6,21 @@ */ //Provides: flow_shortest_string_of_float const -//Requires: caml_js_from_float, caml_new_string +//Requires: caml_js_from_float, caml_string_of_jsbytes function flow_shortest_string_of_float(num) { // TODO: shorten string (drop +, leading 0, shift ., etc) - return caml_new_string(caml_js_from_float(num).toString()); + return caml_string_of_jsbytes(caml_js_from_float(num).toString()); } //Provides: flow_ecma_string_of_float const -//Requires: caml_js_from_float, caml_new_string +//Requires: caml_js_from_float, caml_string_of_jsbytes function flow_ecma_string_of_float(num) { - return caml_new_string(caml_js_from_float(num).toString()); + return caml_string_of_jsbytes(caml_js_from_float(num).toString()); } //Provides: flow_g_fmt const -//Requires: caml_js_from_float, caml_new_string +//Requires: caml_js_from_float, caml_string_of_jsbytes function flow_g_fmt(num) { // TODO: shorten string - return caml_new_string(caml_js_from_float(num).toString()); + return caml_string_of_jsbytes(caml_js_from_float(num).toString()); }