summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2021-05-17 07:59:26 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2021-05-17 13:58:54 +0900
commit080fdbf9e8860c5151aac78081d8a731b09ad545 (patch)
tree3f59cd78bf957ae79dfca5fe31d8e4cf772c36ed /include
parentfbbcee835f972fd2ddc51a83b2e53cfb46555111 (diff)
downloadmruby-080fdbf9e8860c5151aac78081d8a731b09ad545.tar.gz
mruby-080fdbf9e8860c5151aac78081d8a731b09ad545.zip
Rename `mrb_flo_to_fixnum` to `mrb_float_to_integer`.
Diffstat (limited to 'include')
-rw-r--r--include/mruby/numeric.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/mruby/numeric.h b/include/mruby/numeric.h
index 2c59af941..3383b00d0 100644
--- a/include/mruby/numeric.h
+++ b/include/mruby/numeric.h
@@ -154,12 +154,15 @@ mrb_int_mul_overflow(mrb_int a, mrb_int b, mrb_int *c)
# define MRB_FLT_MAX_10_EXP DBL_MAX_10_EXP
# endif /* MRB_USE_FLOAT32 */
-MRB_API mrb_value mrb_flo_to_fixnum(mrb_state *mrb, mrb_value val);
+MRB_API mrb_value mrb_float_to_integer(mrb_state *mrb, mrb_value val);
MRB_API mrb_value mrb_float_to_str(mrb_state *mrb, mrb_value x, const char *fmt);
/* ArgumentError if format string doesn't match /%(\.[0-9]+)?[aAeEfFgG]/ */
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);
+/* obsolete function(s); will be removed */
+#define mrb_flo_to_fixnum(mrb, val) mrb_float_to_integer(mrb, val)
+
#endif /* MRB_NO_FLOAT */
MRB_END_DECL