mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
fix mrb_gc_mark_ht_size() and mrb_gc_free_ht() types
mrb_gc_mark_ht_size() and mrb_gc_free_ht() were declared in gc.h as taking a "RHash *" argument, but then they were defined in hash.c as taking a "RClass *" Get these in sync.
This commit is contained in:
+4
-4
@@ -75,10 +75,10 @@ mrb_gc_mark_ht(mrb_state *mrb, struct RHash *c)
|
||||
}
|
||||
|
||||
size_t
|
||||
mrb_gc_mark_ht_size(mrb_state *mrb, struct RClass *c)
|
||||
mrb_gc_mark_ht_size(mrb_state *mrb, struct RHash *c)
|
||||
{
|
||||
size_t ht_size = 0;
|
||||
khash_t(ht) *h = ((struct RHash*)c)->ht;
|
||||
khash_t(ht) *h = c->ht;
|
||||
|
||||
/* ((struct RHash*)c)->ht */
|
||||
if (h) ht_size += kh_size(h)*2;
|
||||
@@ -87,9 +87,9 @@ mrb_gc_mark_ht_size(mrb_state *mrb, struct RClass *c)
|
||||
}
|
||||
|
||||
void
|
||||
mrb_gc_free_ht(mrb_state *mrb, struct RClass *c)
|
||||
mrb_gc_free_ht(mrb_state *mrb, struct RHash *c)
|
||||
{
|
||||
khash_t(ht) *h = ((struct RHash*)c)->ht;
|
||||
khash_t(ht) *h = c->ht;
|
||||
|
||||
kh_destroy(ht, h);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user