mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #2564 from cremno/use-mrb_stringize
use MRB_STRINGIZE
This commit is contained in:
@@ -52,9 +52,6 @@ The value below allows about 60000 recursive calls in the simplest case. */
|
||||
# define DEBUG(x)
|
||||
#endif
|
||||
|
||||
#define TO_STR(x) TO_STR_(x)
|
||||
#define TO_STR_(x) #x
|
||||
|
||||
#define ARENA_RESTORE(mrb,ai) (mrb)->arena_idx = (ai)
|
||||
|
||||
static inline void
|
||||
@@ -160,7 +157,7 @@ stack_extend_alloc(mrb_state *mrb, int room, int keep)
|
||||
to prevent infinite recursion. However, do this only after resizing the stack, so mrb_raise has stack space to work with. */
|
||||
if (size > MRB_STACK_MAX) {
|
||||
init_new_stack_space(mrb, room, keep);
|
||||
mrb_raise(mrb, E_SYSSTACK_ERROR, "stack level too deep. (limit=" TO_STR(MRB_STACK_MAX) ")");
|
||||
mrb_raise(mrb, E_SYSSTACK_ERROR, "stack level too deep. (limit=" MRB_STRINGIZE(MRB_STACK_MAX) ")");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -301,7 +298,7 @@ mrb_funcall(mrb_state *mrb, mrb_value self, const char *name, mrb_int argc, ...)
|
||||
mrb_sym mid = mrb_intern_cstr(mrb, name);
|
||||
|
||||
if (argc > MRB_FUNCALL_ARGC_MAX) {
|
||||
mrb_raise(mrb, E_ARGUMENT_ERROR, "Too long arguments. (limit=" TO_STR(MRB_FUNCALL_ARGC_MAX) ")");
|
||||
mrb_raise(mrb, E_ARGUMENT_ERROR, "Too long arguments. (limit=" MRB_STRINGIZE(MRB_FUNCALL_ARGC_MAX) ")");
|
||||
}
|
||||
|
||||
va_start(ap, argc);
|
||||
|
||||
Reference in New Issue
Block a user