diff options
| author | dearblue <[email protected]> | 2020-04-11 20:30:03 +0900 |
|---|---|---|
| committer | dearblue <[email protected]> | 2020-04-11 22:11:24 +0900 |
| commit | d9832699085d60e21002e4ba76e3e3fd0480d9e8 (patch) | |
| tree | 385cc529b05fdefefbc454291b83219acb3a1a97 /include | |
| parent | 2ceab2d27084f033538f2f817249a7979134c816 (diff) | |
| download | mruby-d9832699085d60e21002e4ba76e3e3fd0480d9e8.tar.gz mruby-d9832699085d60e21002e4ba76e3e3fd0480d9e8.zip | |
Add `mrb_float_to_cstr()` MRB_API function
In order to share the same operation with `mrb_float_to_str()`,
the internal structure is modified.
Diffstat (limited to 'include')
| -rw-r--r-- | include/mruby/numeric.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/mruby/numeric.h b/include/mruby/numeric.h index a176d96cd..06a33cc6f 100644 --- a/include/mruby/numeric.h +++ b/include/mruby/numeric.h @@ -37,6 +37,7 @@ MRB_API mrb_value mrb_fixnum_to_str(mrb_state *mrb, mrb_value x, mrb_int base); /* ArgumentError if format string doesn't match /%(\.[0-9]+)?[aAeEfFgG]/ */ #ifndef MRB_WITHOUT_FLOAT MRB_API mrb_value mrb_float_to_str(mrb_state *mrb, mrb_value x, const char *fmt); +MRB_API int mrb_float_to_cstr(mrb_state *mrb, char *buf, size_t len, const char *fmt, mrb_float f); MRB_API mrb_float mrb_to_flo(mrb_state *mrb, mrb_value x); MRB_API mrb_value mrb_int_value(mrb_state *mrb, mrb_float f); #endif |
