Permalink
Browse files

Publish mrb_hash_delete_key.

  • Loading branch information...
1 parent 15725eb commit 42fa994e9b6e717ebed88090c4bae3b1d736c1a9 @masamitsu-murase masamitsu-murase committed Aug 25, 2012
Showing with 2 additions and 1 deletion.
  1. +1 −0 include/mruby/hash.h
  2. +1 −1 src/hash.c
View
@@ -26,6 +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(mrb_state *mrb, mrb_value obj);
/* RHASH_TBL allocates st_table if not available. */
View
@@ -488,7 +488,7 @@ mrb_hash_set_default_proc(mrb_state *mrb, mrb_value hash)
return ifnone;
}
-static mrb_value
+mrb_value
mrb_hash_delete_key(mrb_state *mrb, mrb_value hash, mrb_value key)
{
khash_t(ht) *h = RHASH_TBL(hash);

0 comments on commit 42fa994

Please sign in to comment.