diff options
Diffstat (limited to 'src/class.c')
| -rw-r--r-- | src/class.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/class.c b/src/class.c index 402a70f6a..fdf63794b 100644 --- a/src/class.c +++ b/src/class.c @@ -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; } } |
