remove unsafe macros in hash.h

This commit is contained in:
Yukihiro Matsumoto
2012-06-03 00:23:59 +09:00
parent ecbaf9cd99
commit cc86250297
2 changed files with 16 additions and 10 deletions
-2
View File
@@ -33,8 +33,6 @@ 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))
#define RHASH_TBL(h) (RHASH(h)->ht)
#define RHASH_SIZE(h) (RHASH_TBL(h)->size)
#define RHASH_EMPTY_P(h) (RHASH_SIZE(h) == 0)
#define RHASH_IFNONE(h) mrb_iv_get(mrb, (h), mrb_intern(mrb, "ifnone"))
#define RHASH_PROCDEFAULT(h) RHASH_IFNONE(h)
struct kh_ht * mrb_hash_tbl(mrb_state *mrb, mrb_value hash);