summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/codegen.c5
-rw-r--r--src/dump.c6
2 files changed, 6 insertions, 5 deletions
diff --git a/src/codegen.c b/src/codegen.c
index 091561b45..e240995e5 100644
--- a/src/codegen.c
+++ b/src/codegen.c
@@ -59,7 +59,7 @@ typedef struct scope {
int icapa;
mrb_irep *irep;
- int pcapa;
+ size_t pcapa;
int scapa;
int nlocals;
@@ -2505,7 +2505,8 @@ codedump(mrb_state *mrb, int n)
{
#ifdef ENABLE_STDIO
mrb_irep *irep = mrb->irep[n];
- int i, ai;
+ uint32_t i;
+ int ai;
mrb_code c;
if (!irep) return;
diff --git a/src/dump.c b/src/dump.c
index bf3d25f13..72ca9e0c3 100644
--- a/src/dump.c
+++ b/src/dump.c
@@ -364,13 +364,13 @@ write_lineno_record(mrb_state *mrb, mrb_irep *irep, uint8_t* bin)
}
static int
-mrb_write_section_lineno(mrb_state *mrb, int start_index, uint8_t *bin)
+mrb_write_section_lineno(mrb_state *mrb, size_t start_index, uint8_t *bin)
{
- int irep_no;
+ size_t irep_no;
uint32_t section_size = 0, rlen = 0; /* size of irep record */
uint8_t *cur = bin;
- if (mrb == NULL || start_index < 0 || start_index >= mrb->irep_len || bin == NULL) {
+ if (mrb == NULL || start_index >= mrb->irep_len || bin == NULL) {
return MRB_DUMP_INVALID_ARGUMENT;
}