From 896338e21969284ceb576f1665ea33aa54797493 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Mon, 21 Sep 2020 17:06:18 +0900 Subject: 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 --- include/mruby/string.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') 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. -- cgit v1.2.3