diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-09-21 17:06:18 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-10-12 18:20:26 +0900 |
| commit | 896338e21969284ceb576f1665ea33aa54797493 (patch) | |
| tree | 4227020a582bdadc8141c94c83b8f48cfce181f7 /include | |
| parent | bff79112a61959902c89757e473ea62346685847 (diff) | |
| download | mruby-896338e21969284ceb576f1665ea33aa54797493.tar.gz mruby-896338e21969284ceb576f1665ea33aa54797493.zip | |
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
Diffstat (limited to 'include')
| -rw-r--r-- | include/mruby/string.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/mruby/string.h b/include/mruby/string.h index 81b1c0ed1..8384128c7 100644 --- a/include/mruby/string.h +++ b/include/mruby/string.h @@ -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. |
