Update struct initializer to work with relatively older C++.

This commit is contained in:
Yukihiro "Matz" Matsumoto
2021-09-20 19:13:17 +09:00
parent 8be78dbf9d
commit d6dd6f0e7b
5 changed files with 17 additions and 15 deletions
+3 -1
View File
@@ -1698,8 +1698,10 @@ mrb_define_module_function(mrb_state *mrb, struct RClass *c, const char *name, m
static void
mc_clear(mrb_state *mrb)
{
static const struct mrb_cache_entry ce_zero ={0};
for (int i=0; i<MRB_METHOD_CACHE_SIZE; i++) {
mrb->cache[i] = (struct mrb_cache_entry){0};
mrb->cache[i] = ce_zero;
}
}