summaryrefslogtreecommitdiff
path: root/ruby.h
diff options
context:
space:
mode:
Diffstat (limited to 'ruby.h')
-rw-r--r--ruby.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/ruby.h b/ruby.h
index 40c95f2050..648704b842 100644
--- a/ruby.h
+++ b/ruby.h
@@ -374,6 +374,11 @@ struct RHash {
int iter_lev;
VALUE ifnone;
};
+#define RHASH_TBL(h) (RHASH(h)->tbl)
+#define RHASH_ITER_LEV(h) (RHASH(h)->iter_lev)
+#define RHASH_IFNONE(h) (RHASH(h)->ifnone)
+#define RHASH_SIZE(h) (RHASH(h)->tbl->num_entries)
+#define RHASH_EMPTY_P(h) (RHASH_SIZE(h) == 0)
struct RFile {
struct RBasic basic;