summaryrefslogtreecommitdiffhomepage
path: root/src/codegen.c
diff options
context:
space:
mode:
authortake_cheeze <[email protected]>2013-09-01 22:50:02 +0900
committertake_cheeze <[email protected]>2013-09-02 00:48:06 +0900
commit8082a37748215462562977dab9b78ae92eca0ad6 (patch)
tree8d275bdde0b2dc6cd3744dddaead9e18c66bf6ce /src/codegen.c
parent3d1fffbd6bce3a6f9a77af3116078574ce8d5fe9 (diff)
downloadmruby-8082a37748215462562977dab9b78ae92eca0ad6.tar.gz
mruby-8082a37748215462562977dab9b78ae92eca0ad6.zip
use uint16_t for line type
Diffstat (limited to 'src/codegen.c')
-rw-r--r--src/codegen.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/codegen.c b/src/codegen.c
index 5ba5e4f03..e4fa75b33 100644
--- a/src/codegen.c
+++ b/src/codegen.c
@@ -53,10 +53,10 @@ typedef struct scope {
struct loopinfo *loop;
int ensure_level;
char const *filename;
- short lineno;
+ uint16_t lineno;
mrb_code *iseq;
- short *lines;
+ uint16_t *lines;
int icapa;
mrb_irep *irep;
@@ -144,7 +144,7 @@ genop(codegen_scope *s, mrb_code i)
s->icapa *= 2;
s->iseq = (mrb_code *)codegen_realloc(s, s->iseq, sizeof(mrb_code)*s->icapa);
if (s->lines) {
- s->lines = (short*)codegen_realloc(s, s->lines, sizeof(short)*s->icapa);
+ s->lines = (uint16_t*)codegen_realloc(s, s->lines, sizeof(short)*s->icapa);
s->irep->lines = s->lines;
}
}
@@ -2407,7 +2407,7 @@ scope_new(mrb_state *mrb, codegen_scope *prev, node *lv)
p->filename = prev->filename;
if (p->filename) {
- p->lines = (short*)mrb_malloc(mrb, sizeof(short)*p->icapa);
+ p->lines = (uint16_t*)mrb_malloc(mrb, sizeof(short)*p->icapa);
}
p->lineno = prev->lineno;