mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Revert "class.c (include_module_at): narrow local variable scope"
C++ does not compile `goto` cross local variable declaration.
This reverts commit c618b44fee.
This commit is contained in:
+2
-1
@@ -1464,6 +1464,7 @@ include_class_new(mrb_state *mrb, struct RClass *m, struct RClass *super)
|
||||
static int
|
||||
include_module_at(mrb_state *mrb, struct RClass *c, struct RClass *ins_pos, struct RClass *m, int search_super)
|
||||
{
|
||||
struct RClass *ic;
|
||||
void *klass_mt = find_origin(c)->mt;
|
||||
|
||||
while (m) {
|
||||
@@ -1494,7 +1495,7 @@ include_module_at(mrb_state *mrb, struct RClass *c, struct RClass *ins_pos, stru
|
||||
p = p->super;
|
||||
}
|
||||
|
||||
struct RClass *ic = include_class_new(mrb, m, ins_pos->super);
|
||||
ic = include_class_new(mrb, m, ins_pos->super);
|
||||
m->flags |= MRB_FL_CLASS_IS_INHERITED;
|
||||
ins_pos->super = ic;
|
||||
mrb_field_write_barrier(mrb, (struct RBasic*)ins_pos, (struct RBasic*)ic);
|
||||
|
||||
Reference in New Issue
Block a user