summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2021-05-29 23:41:35 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2021-05-30 08:15:51 +0900
commit8a4bcc58c92ff921368b3f41a5e234266a11728c (patch)
tree6977fee05e27e35285100973f5b275e72c160826 /include
parent60aa2192a8afc7a2f58196f1667f254832ca8c25 (diff)
downloadmruby-8a4bcc58c92ff921368b3f41a5e234266a11728c.tar.gz
mruby-8a4bcc58c92ff921368b3f41a5e234266a11728c.zip
numeric.c: introduce `mrb_int_to_cstr()` to dump `mrb_int`.
* refactor `mrb_integer_to_str()` * refactor `mrb_str_format()`
Diffstat (limited to 'include')
-rw-r--r--include/mruby/numeric.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/mruby/numeric.h b/include/mruby/numeric.h
index 4e3e8976a..52e335ade 100644
--- a/include/mruby/numeric.h
+++ b/include/mruby/numeric.h
@@ -35,6 +35,7 @@ MRB_API mrb_value mrb_num_minus(mrb_state *mrb, mrb_value x, mrb_value y);
MRB_API mrb_value mrb_num_mul(mrb_state *mrb, mrb_value x, mrb_value y);
MRB_API mrb_value mrb_integer_to_str(mrb_state *mrb, mrb_value x, mrb_int base);
+MRB_API char *mrb_int_to_cstr(char *buf, size_t len, mrb_int n, mrb_int base);
/* internal function(s) */
mrb_int mrb_div_int(mrb_state *mrb, mrb_int x, mrb_int y);