Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dtoa_stubs.js: rename caml_new_string to caml_string_of_jsbytes to avoid deprecation warning #9

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions js/dtoa_stubs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Loading