mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Unify mrb_str_to_str to mrb_obj_as_string.
Redirect `mrb_str_to_str` to `mrb_obj_as_string` via C macro. Inspired by #5082
This commit is contained in:
@@ -377,8 +377,9 @@ MRB_API double mrb_cstr_to_dbl(mrb_state *mrb, const char *s, mrb_bool badcheck)
|
||||
/**
|
||||
* Returns a converted string type.
|
||||
* For type checking, non converting `mrb_to_str` is recommended.
|
||||
* obsolete: use `mrb_obj_as_string()` instead.
|
||||
*/
|
||||
MRB_API mrb_value mrb_str_to_str(mrb_state *mrb, mrb_value str);
|
||||
#define mrb_str_to_str(mrb, str) mrb_obj_as_string(mrb, str)
|
||||
|
||||
/**
|
||||
* Returns true if the strings match and false if the strings don't match.
|
||||
|
||||
Reference in New Issue
Block a user