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.

This commit is contained in:
Masaki Muranaka
2013-03-29 16:26:00 +09:00
parent c67aec25b6
commit 2b6e9ee556
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -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;