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.
This commit is contained in:
Yukihiro "Matz" Matsumoto
2021-06-15 16:19:16 +09:00
parent 50b6fafddf
commit 7c8a91ff5a
2 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -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 */