Update mrb_to_str and related functions.

Contrary to the name, `mrb_to_str` just checks type, no conversion.
This commit is contained in:
Yukihiro "Matz" Matsumoto
2019-08-07 16:20:40 +09:00
parent 98fc887cb3
commit b377b7d580
3 changed files with 9 additions and 20 deletions
+1
View File
@@ -1186,6 +1186,7 @@ MRB_API void mrb_gc_unregister(mrb_state *mrb, mrb_value obj);
MRB_API mrb_value mrb_to_int(mrb_state *mrb, mrb_value val);
#define mrb_int(mrb, val) mrb_fixnum(mrb_to_int(mrb, val))
/* string type checking (contrary to the name, it doesn't convert) */
MRB_API mrb_value mrb_to_str(mrb_state *mrb, mrb_value val);
MRB_API void mrb_check_type(mrb_state *mrb, mrb_value x, enum mrb_vtype t);