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:
Mitchell Blank Jr
2012-05-19 23:33:01 -07:00
parent e3abf33384
commit d9529f198d
+4 -4
View File
@@ -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);
}