Rename `ht_foreach_func` to `mrb_hash_foreach_func`.

parent e935d20a
...@@ -211,8 +211,8 @@ size_t mrb_gc_mark_hash_size(mrb_state*, struct RHash*); ...@@ -211,8 +211,8 @@ size_t mrb_gc_mark_hash_size(mrb_state*, struct RHash*);
void mrb_gc_free_hash(mrb_state*, struct RHash*); void mrb_gc_free_hash(mrb_state*, struct RHash*);
/* return non zero to break the loop */ /* return non zero to break the loop */
typedef int (ht_foreach_func)(mrb_state *mrb, mrb_value key, mrb_value val, void *data); typedef int (mrb_hash_foreach_func)(mrb_state *mrb, mrb_value key, mrb_value val, void *data);
MRB_API void mrb_hash_foreach(mrb_state *mrb, struct RHash *hash, ht_foreach_func *func, void *p); MRB_API void mrb_hash_foreach(mrb_state *mrb, struct RHash *hash, mrb_hash_foreach_func *func, void *p);
MRB_END_DECL MRB_END_DECL
......
...@@ -498,7 +498,7 @@ ht_del(mrb_state *mrb, htable *t, mrb_value key, mrb_value *vp) ...@@ -498,7 +498,7 @@ ht_del(mrb_state *mrb, htable *t, mrb_value key, mrb_value *vp)
/* Iterates over the hash table. */ /* Iterates over the hash table. */
static void static void
ht_foreach(mrb_state *mrb, htable *t, ht_foreach_func *func, void *p) ht_foreach(mrb_state *mrb, htable *t, mrb_hash_foreach_func *func, void *p)
{ {
segment *seg; segment *seg;
mrb_int i; mrb_int i;
...@@ -521,7 +521,7 @@ ht_foreach(mrb_state *mrb, htable *t, ht_foreach_func *func, void *p) ...@@ -521,7 +521,7 @@ ht_foreach(mrb_state *mrb, htable *t, ht_foreach_func *func, void *p)
/* Iterates over the hash table. */ /* Iterates over the hash table. */
MRB_API void MRB_API void
mrb_hash_foreach(mrb_state *mrb, struct RHash *hash, ht_foreach_func *func, void *p) mrb_hash_foreach(mrb_state *mrb, struct RHash *hash, mrb_hash_foreach_func *func, void *p)
{ {
ht_foreach(mrb, hash->ht, func, p); ht_foreach(mrb, hash->ht, func, p);
} }
......
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