diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-06-15 16:19:16 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-06-15 16:19:16 +0900 |
| commit | 7c8a91ff5a41edbc04183042e772e16073fb61ba (patch) | |
| tree | b9e3b117bc2082a6c4eba791c90cf125bc74004b /include | |
| parent | 50b6fafddf2fa37727e812fbda8b7a61a8ca1ca1 (diff) | |
| download | mruby-7c8a91ff5a41edbc04183042e772e16073fb61ba.tar.gz mruby-7c8a91ff5a41edbc04183042e772e16073fb61ba.zip | |
numeric.c: restore `fmt` argument for backward compatibility.
`mrb_float_to_str()` used to take `fmt` argument. We thought no one used
the function, and OK to remove the argument. But at least `mruby-redis`
gem used the function.
Diffstat (limited to 'include')
| -rw-r--r-- | include/mruby/numeric.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/mruby/numeric.h b/include/mruby/numeric.h index 52e335ade..e09a797ed 100644 --- a/include/mruby/numeric.h +++ b/include/mruby/numeric.h @@ -166,7 +166,7 @@ MRB_API mrb_float mrb_as_float(mrb_state *mrb, mrb_value x); /* internal functions */ mrb_float mrb_div_float(mrb_float x, mrb_float y); -mrb_value mrb_float_to_str(mrb_state *mrb, mrb_value x); +mrb_value mrb_float_to_str(mrb_state *mrb, mrb_value x, const char *fmt); int mrb_format_float(mrb_float f, char *buf, size_t buf_size, char fmt, int prec, char sign); /* obsolete functions; will be removed */ |
