diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-08-30 22:14:10 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-08-30 22:30:36 +0900 |
| commit | f6564dd83e058fee6b264b5ce6db6d868c22d94a (patch) | |
| tree | 279aea8c7c7fe58c03dde17c2d214754c5c1239b /include | |
| parent | e471d37ca5f1422860a1eaa81d4c9f1b3c8b6aed (diff) | |
| download | mruby-f6564dd83e058fee6b264b5ce6db6d868c22d94a.tar.gz mruby-f6564dd83e058fee6b264b5ce6db6d868c22d94a.zip | |
Add new function `mrb_ensure_hash_type()`; ref #4097
Unlike `mrb_check_hash_type()` that returns `nil` if the argument is
not a `Hash`, `mrb_ensure_hash_type()` raises a `TypeError` exception.
Diffstat (limited to 'include')
| -rw-r--r-- | include/mruby/hash.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/mruby/hash.h b/include/mruby/hash.h index 2026c8e0d..449a7d4bc 100644 --- a/include/mruby/hash.h +++ b/include/mruby/hash.h @@ -25,6 +25,7 @@ struct RHash { #define mrb_hash_value(p) mrb_obj_value((void*)(p)) MRB_API mrb_value mrb_hash_new_capa(mrb_state*, mrb_int); +MRB_API mrb_value mrb_ensure_hash_type(mrb_state *mrb, mrb_value hash); MRB_API mrb_value mrb_check_hash_type(mrb_state *mrb, mrb_value hash); /* |
