Rename `mrb_fixnum_to_str` to `mrb_integer_to_str`.
MODIFY
include/mruby/numeric.h
include/mruby/numeric.h
@@ -30,12 +30,15 @@ MRB_BEGIN_DECL
#endif
#endif
-MRB_API mrb_value mrb_fixnum_to_str(mrb_state *mrb, mrb_value x, mrb_int base);
-
MRB_API mrb_value mrb_num_plus(mrb_state *mrb, mrb_value x, mrb_value y);
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);
+
+/* obsolete function(s); will be removed */
+#define mrb_fixnum_to_str(mrb, x, base) mrb_integer_to_str(mrb, x, base)
+
#ifndef __has_builtin
#define __has_builtin(x) 0
#endif

MODIFY
mrbgems/mruby-socket/src/socket.c
mrbgems/mruby-socket/src/socket.c
@@ -142,7 +142,7 @@ mrb_addrinfo_getaddrinfo(mrb_state *mrb, mrb_value klass)
if (mrb_string_p(service)) {
servname = RSTRING_CSTR(mrb, service);
} else if (mrb_integer_p(service)) {
- servname = RSTRING_PTR(mrb_fixnum_to_str(mrb, service, 10));
+ servname = RSTRING_PTR(mrb_integer_to_str(mrb, service, 10));
} else if (mrb_nil_p(service)) {
servname = NULL;
} else {

MODIFY
mrbgems/mruby-sprintf/src/sprintf.c
mrbgems/mruby-sprintf/src/sprintf.c
@@ -957,7 +957,7 @@ retry:
val = mrb_fix2binstr(mrb, mrb_int_value(mrb, v), base);
}
else {
- val = mrb_fixnum_to_str(mrb, mrb_int_value(mrb, v), base);
+ val = mrb_integer_to_str(mrb, mrb_int_value(mrb, v), base);
}
strncpy(++s, RSTRING_PTR(val), sizeof(nbuf)-2);
}

MODIFY
src/numeric.c
src/numeric.c
@@ -1526,7 +1526,7 @@ int_sub(mrb_state *mrb, mrb_value self)
MRB_API mrb_value
-mrb_fixnum_to_str(mrb_state *mrb, mrb_value x, mrb_int base)
+mrb_integer_to_str(mrb_state *mrb, mrb_value x, mrb_int base)
{
char buf[MRB_INT_BIT+1];
char *b = buf + sizeof buf;
@@ -1579,7 +1579,7 @@ int_to_s(mrb_state *mrb, mrb_value self)
mrb_int base = 10;
mrb_get_args(mrb, "|i", &base);
- return mrb_fixnum_to_str(mrb, self, base);
+ return mrb_integer_to_str(mrb, self, base);
}
/* compare two numbers: (1:0:-1; -2 for error) */

MODIFY
src/string.c
src/string.c
@@ -1901,7 +1901,7 @@ mrb_obj_as_string(mrb_state *mrb, mrb_value obj)
case MRB_TT_SYMBOL:
return mrb_sym_str(mrb, mrb_symbol(obj));
case MRB_TT_INTEGER:
- return mrb_fixnum_to_str(mrb, obj, 10);
+ return mrb_integer_to_str(mrb, obj, 10);
case MRB_TT_SCLASS:
case MRB_TT_CLASS:
case MRB_TT_MODULE:

Rename `mrb_fixnum_to_str` to `mrb_integer_to_str`.