Commit c152b10d authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #404 from monaka/pr-cleanup-hash

Clean up hash.[ch]
parents 8afe33b2 22b032fc
...@@ -26,10 +26,7 @@ mrb_value mrb_hash_new(mrb_state *mrb); ...@@ -26,10 +26,7 @@ mrb_value mrb_hash_new(mrb_state *mrb);
void mrb_hash_set(mrb_state *mrb, mrb_value hash, mrb_value key, mrb_value val); void mrb_hash_set(mrb_state *mrb, mrb_value hash, mrb_value key, mrb_value val);
mrb_value mrb_hash_get(mrb_state *mrb, mrb_value hash, mrb_value key); mrb_value mrb_hash_get(mrb_state *mrb, mrb_value hash, mrb_value key);
mrb_value mrb_hash_fetch(mrb_state *mrb, mrb_value hash, mrb_value key, mrb_value def); mrb_value mrb_hash_fetch(mrb_state *mrb, mrb_value hash, mrb_value key, mrb_value def);
mrb_value mrb_hash_delete_key(mrb_state *mrb, mrb_value hash, mrb_value key);
mrb_value mrb_hash_keys(mrb_state *mrb, mrb_value hash);
mrb_value mrb_hash(mrb_state *mrb, mrb_value obj); mrb_value mrb_hash(mrb_state *mrb, mrb_value obj);
mrb_value mrb_check_hash_type(mrb_state *mrb, mrb_value self);
/* RHASH_TBL allocates st_table if not available. */ /* RHASH_TBL allocates st_table if not available. */
#define RHASH(obj) ((struct RHash*)((obj).value.p)) #define RHASH(obj) ((struct RHash*)((obj).value.p))
......
...@@ -488,7 +488,7 @@ mrb_hash_set_default_proc(mrb_state *mrb, mrb_value hash) ...@@ -488,7 +488,7 @@ mrb_hash_set_default_proc(mrb_state *mrb, mrb_value hash)
return ifnone; return ifnone;
} }
mrb_value static mrb_value
mrb_hash_delete_key(mrb_state *mrb, mrb_value hash, mrb_value key) mrb_hash_delete_key(mrb_state *mrb, mrb_value hash, mrb_value key)
{ {
khash_t(ht) *h = RHASH_TBL(hash); khash_t(ht) *h = RHASH_TBL(hash);
...@@ -965,7 +965,7 @@ mrb_hash_to_hash(mrb_state *mrb, mrb_value hash) ...@@ -965,7 +965,7 @@ mrb_hash_to_hash(mrb_state *mrb, mrb_value hash)
* *
*/ */
mrb_value static mrb_value
mrb_hash_keys(mrb_state *mrb, mrb_value hash) mrb_hash_keys(mrb_state *mrb, mrb_value hash)
{ {
khash_t(ht) *h = RHASH_TBL(hash); khash_t(ht) *h = RHASH_TBL(hash);
......
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