diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/codegen.c | 2 | ||||
| -rw-r--r-- | src/parse.y | 2 | ||||
| -rw-r--r-- | src/vm.c | 7 |
3 files changed, 4 insertions, 7 deletions
diff --git a/src/codegen.c b/src/codegen.c index 48ab63de0..b2b1e4150 100644 --- a/src/codegen.c +++ b/src/codegen.c @@ -2715,7 +2715,7 @@ codedump(mrb_state *mrb, mrb_irep *irep) int32_t line; if (!irep) return; - printf("irep %p nregs=%d nlocals=%d pools=%d syms=%d reps=%d\n", irep, + printf("irep %p nregs=%d nlocals=%d pools=%d syms=%d reps=%d\n", (void*)irep, irep->nregs, irep->nlocals, (int)irep->plen, (int)irep->slen, (int)irep->rlen); for (i = 0; i < (int)irep->ilen; i++) { diff --git a/src/parse.y b/src/parse.y index 832689bae..0c0a9877f 100644 --- a/src/parse.y +++ b/src/parse.y @@ -6366,7 +6366,7 @@ mrb_parser_dump(mrb_state *mrb, node *tree, int offset) break; default: - printf("node type: %d (0x%x)\n", (int)n, (int)n); + printf("node type: %d (0x%x)\n", n, (unsigned)n); break; } #endif @@ -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); |
