summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2012-07-29 04:47:33 -0700
committerYukihiro "Matz" Matsumoto <[email protected]>2012-07-29 04:47:33 -0700
commitc152b10d1f619591846249ac94869e3f3529b928 (patch)
treee94e72cb578aeb488e4d3fc7a331da6562ff8370
parent8afe33b210cd8ba4017ee95ac0efc801379f7fd1 (diff)
parent22b032fcdf4bc73eb2aaaafc823c10b5cd0ade31 (diff)
downloadmruby-c152b10d1f619591846249ac94869e3f3529b928.tar.gz
mruby-c152b10d1f619591846249ac94869e3f3529b928.zip
Merge pull request #404 from monaka/pr-cleanup-hash
Clean up hash.[ch]
-rw-r--r--include/mruby/hash.h3
-rw-r--r--src/hash.c4
2 files changed, 2 insertions, 5 deletions
diff --git a/include/mruby/hash.h b/include/mruby/hash.h
index 7a16d7b5a..f3755eb25 100644
--- a/include/mruby/hash.h
+++ b/include/mruby/hash.h
@@ -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);
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_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_check_hash_type(mrb_state *mrb, mrb_value self);
/* RHASH_TBL allocates st_table if not available. */
#define RHASH(obj) ((struct RHash*)((obj).value.p))
diff --git a/src/hash.c b/src/hash.c
index 5d3835019..927e40e66 100644
--- a/src/hash.c
+++ b/src/hash.c
@@ -488,7 +488,7 @@ mrb_hash_set_default_proc(mrb_state *mrb, mrb_value hash)
return ifnone;
}
-mrb_value
+static mrb_value
mrb_hash_delete_key(mrb_state *mrb, mrb_value hash, mrb_value key)
{
khash_t(ht) *h = RHASH_TBL(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)
{
khash_t(ht) *h = RHASH_TBL(hash);