diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-01-21 14:53:18 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-01-21 14:53:18 +0900 |
| commit | 6c5ccd5abe4e37ea981a28980ea6fc453a842610 (patch) | |
| tree | f81e1aafa0334e8a792800751cc22672eeb3de23 /src/hash.c | |
| parent | 438d114917af8b404c79fc94ec86f414a4ae6d60 (diff) | |
| parent | 90b53f4c29dd845140175943263b9c67995324c4 (diff) | |
| download | mruby-6c5ccd5abe4e37ea981a28980ea6fc453a842610.tar.gz mruby-6c5ccd5abe4e37ea981a28980ea6fc453a842610.zip | |
Merge branch 'avoid-including-presym.inc-in-existing-header-files' of https://github.com/shuujii/mruby into shuujii-avoid-including-presym.inc-in-existing-header-files
Diffstat (limited to 'src/hash.c')
| -rw-r--r-- | src/hash.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/hash.c b/src/hash.c index 3195c3e7e..289f02a91 100644 --- a/src/hash.c +++ b/src/hash.c @@ -11,6 +11,7 @@ #include <mruby/hash.h> #include <mruby/string.h> #include <mruby/variable.h> +#include <mruby/presym.h> /* * === Glossary @@ -254,6 +255,8 @@ HT_ASSERT_SAFE_READ(ea_capa); #define h_ar_p(h) (!h_ht_p(h)) #define h_ar_on(h) h_ht_off(h) #define lesser(a, b) ((a) < (b) ? (a) : (b)) +#define RHASH_IFNONE(hash) mrb_iv_get(mrb, (hash), MRB_SYM(ifnone)) +#define RHASH_PROCDEFAULT(hash) RHASH_IFNONE(hash) static uint32_t ib_upper_bound_for(uint32_t capa); static uint32_t ib_bit_to_capa(uint32_t bit); |
