mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Fix a few casting warnings.
Signed-off-by: Patrick Hogan <pbhogan@gmail.com>
This commit is contained in:
@@ -31,7 +31,7 @@ mrb_data_object_alloc(mrb_state *mrb, struct RClass *klass, void *ptr, const str
|
||||
|
||||
data = mrb_obj_alloc(mrb, MRB_TT_DATA, klass);
|
||||
data->data = ptr;
|
||||
data->type = type;
|
||||
data->type = (struct mrb_data_type *) type;
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
+1
-1
@@ -4658,7 +4658,7 @@ parser_new(mrb_state *mrb)
|
||||
p->cmd_start = TRUE;
|
||||
p->in_def = p->in_single = FALSE;
|
||||
|
||||
p->capture_errors = NULL;
|
||||
p->capture_errors = 0;
|
||||
|
||||
p->lineno = 1;
|
||||
#if defined(PARSER_TEST) || defined(PARSER_DEBUG)
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ mrb_closure_new(mrb_state *mrb, mrb_irep *irep)
|
||||
struct REnv *e;
|
||||
|
||||
if (!mrb->ci->env) {
|
||||
e = mrb_obj_alloc(mrb, MRB_TT_ENV, mrb->ci->proc->env);
|
||||
e = mrb_obj_alloc(mrb, MRB_TT_ENV, (struct RClass *) mrb->ci->proc->env);
|
||||
e->flags= (unsigned int)irep->nlocals;
|
||||
e->mid = mrb->ci->mid;
|
||||
e->cioff = mrb->ci - mrb->cibase;
|
||||
|
||||
Reference in New Issue
Block a user