Commit cf680f05 authored by Jun Hiroe's avatar Jun Hiroe

Refactor mrb_str_new() in string.c

parent a1a5eae9
...@@ -277,10 +277,7 @@ str_buf_cat(mrb_state *mrb, struct RString *s, const char *ptr, size_t len) ...@@ -277,10 +277,7 @@ str_buf_cat(mrb_state *mrb, struct RString *s, const char *ptr, size_t len)
mrb_value mrb_value
mrb_str_new(mrb_state *mrb, const char *p, size_t len) mrb_str_new(mrb_state *mrb, const char *p, size_t len)
{ {
struct RString *s; return mrb_obj_value(str_new(mrb, p, len));
s = str_new(mrb, p, len);
return mrb_obj_value(s);
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment