mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
use mrb_str_cat_lit for literals
This commit is contained in:
+2
-2
@@ -440,11 +440,11 @@ mrb_any_to_s(mrb_state *mrb, mrb_value obj)
|
||||
mrb_value str = mrb_str_buf_new(mrb, 20);
|
||||
const char *cname = mrb_obj_classname(mrb, obj);
|
||||
|
||||
mrb_str_buf_cat(mrb, str, "#<", 2);
|
||||
mrb_str_cat_lit(mrb, str, "#<");
|
||||
mrb_str_cat_cstr(mrb, str, cname);
|
||||
mrb_str_cat_lit(mrb, str, ":");
|
||||
mrb_str_concat(mrb, str, mrb_ptr_to_str(mrb, mrb_cptr(obj)));
|
||||
mrb_str_buf_cat(mrb, str, ">", 1);
|
||||
mrb_str_cat_lit(mrb, str, ">");
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user