fix indent in struct.c

parent 45890fae
......@@ -41,8 +41,8 @@ struct_ivar_get(mrb_state *mrb, mrb_value c, mrb_sym id)
{
struct RClass* kclass;
struct RClass* sclass = struct_class(mrb);
mrb_value ans;
for (;;) {
ans = mrb_iv_get(mrb, c, id);
if (!mrb_nil_p(ans)) return ans;
......@@ -99,7 +99,6 @@ mrb_struct_s_members_m(mrb_state *mrb, mrb_value klass)
mrb_ary_push(mrb, ary, *p);
p++;
}
return ary;
}
......@@ -216,7 +215,6 @@ mrb_struct_set(mrb_state *mrb, mrb_value obj, mrb_value val)
return ptr[i] = val;
}
}
mrb_raisef(mrb, E_NAME_ERROR, "`%s' is not a struct member",
mrb_sym2name(mrb, mid));
return mrb_nil_value(); /* not reached */
......@@ -292,7 +290,6 @@ make_struct(mrb_state *mrb, mrb_value name, mrb_value members, struct RClass * k
mrb_define_method_id(mrb, c, mrb_id_attrset(mrb, id), mrb_struct_set_m, ARGS_REQ(1));
}
}
return nstr;
}
......@@ -407,6 +404,7 @@ static int
num_members(mrb_state *mrb, struct RClass *klass)
{
mrb_value members;
members = struct_ivar_get(mrb, mrb_obj_value(klass), mrb_intern(mrb, "__members__"));
if (!mrb_array_p(members)) {
mrb_raise(mrb, E_TYPE_ERROR, "broken members");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment