make cioff in struct REnv from int to ptrdiff_t; close #2149

This commit is contained in:
Yukihiro "Matz" Matsumoto
2014-04-29 12:25:15 +09:00
parent 48e82d7c77
commit 2ca5bed901
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ struct REnv {
MRB_OBJECT_HEADER;
mrb_value *stack;
mrb_sym mid;
int cioff;
ptrdiff_t cioff;
};
#define MRB_ENV_STACK_LEN(e) ((e)->flags)
+1 -1
View File
@@ -43,7 +43,7 @@ closure_setup(mrb_state *mrb, struct RProc *p, int nlocals)
e = (struct REnv*)mrb_obj_alloc(mrb, MRB_TT_ENV, (struct RClass*)mrb->c->ci->proc->env);
MRB_ENV_STACK_LEN(e)= (unsigned int)nlocals;
e->mid = mrb->c->ci->mid;
e->cioff = mrb->c->ci - mrb->c->cibase;
e->cioff = mrb->c->ci - mrb->c->cibase;
e->stack = mrb->c->stack;
mrb->c->ci->env = e;
}