From 2b6e9ee556fabebf732ba24fe1de2250b6a6dda2 Mon Sep 17 00:00:00 2001 From: Masaki Muranaka Date: Fri, 29 Mar 2013 16:26:00 +0900 Subject: Modify the type of line-number to uint16_t. Type short is not portable. And it cannot be more than UINT16_MAX because of the mrbc binary format. --- src/codegen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/codegen.c') diff --git a/src/codegen.c b/src/codegen.c index cff3b3ce4..e5b1802a1 100644 --- a/src/codegen.c +++ b/src/codegen.c @@ -2401,7 +2401,7 @@ scope_finish(codegen_scope *s) irep->iseq = (mrb_code *)codegen_realloc(s, s->iseq, sizeof(mrb_code)*s->pc); irep->ilen = s->pc; if (s->lines) { - irep->lines = (short *)codegen_realloc(s, s->lines, sizeof(short)*s->pc); + irep->lines = (uint16_t *)codegen_realloc(s, s->lines, sizeof(uint16_t)*s->pc); } else { irep->lines = 0; -- cgit v1.2.3