Skip to content

Commit

Permalink
Runtime: add integers_uint{32|64}_to_hexstring stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
zbaylin committed Jul 7, 2023
1 parent 141e0bc commit 00effb6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,12 @@ function integers_uint32_to_string(i) {
return caml_new_string(i.value.toString());
}

//Provides: integers_uint32_to_hexstring
//Requires: caml_new_string
function integers_uint32_to_hexstring(i) {
return caml_new_string(i.value.toString(16));
}

//Provides: integers_uint64_add
//Requires: caml_int64_add
function integers_uint64_add(x, y) {
Expand Down Expand Up @@ -322,6 +328,12 @@ function integers_uint64_to_string(i) {
return caml_int64_format(caml_new_string("%u"), i);
}

//Provides: integers_uint64_to_hexstring
//Requires: caml_int64_format, caml_new_string
function integers_uint64_to_hexstring(i) {
return caml_int64_format(caml_new_string("%x"), i);
}

//Provides: integers_uint8_of_string
//Requires: integers_uint32_of_string
function integers_uint8_of_string(x) {
Expand Down

0 comments on commit 00effb6

Please sign in to comment.