Commit d9529f19 authored by Mitchell Blank Jr's avatar Mitchell Blank Jr

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.
parent e3abf333
...@@ -75,10 +75,10 @@ mrb_gc_mark_ht(mrb_state *mrb, struct RHash *c) ...@@ -75,10 +75,10 @@ mrb_gc_mark_ht(mrb_state *mrb, struct RHash *c)
} }
size_t 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; size_t ht_size = 0;
khash_t(ht) *h = ((struct RHash*)c)->ht; khash_t(ht) *h = c->ht;
/* ((struct RHash*)c)->ht */ /* ((struct RHash*)c)->ht */
if (h) ht_size += kh_size(h)*2; if (h) ht_size += kh_size(h)*2;
...@@ -87,9 +87,9 @@ mrb_gc_mark_ht_size(mrb_state *mrb, struct RClass *c) ...@@ -87,9 +87,9 @@ mrb_gc_mark_ht_size(mrb_state *mrb, struct RClass *c)
} }
void 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); kh_destroy(ht, h);
} }
......
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