mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
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.
This commit is contained in:
@@ -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);
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user