diff options
| author | cremno <[email protected]> | 2015-07-16 03:56:31 +0200 |
|---|---|---|
| committer | cremno <[email protected]> | 2015-07-16 03:56:31 +0200 |
| commit | 938ed044f4e053c1832be3868230d80ccba190e8 (patch) | |
| tree | 78019791c7bbcdaadca128a7a1692ac7422996af /src/variable.c | |
| parent | 207577f0af72874d9d643f2c46b881a9159d42d7 (diff) | |
| download | mruby-938ed044f4e053c1832be3868230d80ccba190e8.tar.gz mruby-938ed044f4e053c1832be3868230d80ccba190e8.zip | |
use mrb_str_cat_str() instead of mrb_str_append()
If the argument is always a string, then mrb_str_cat_str() can be
directly called instead of indirectly by mrb_str_append().
mrb_any_to_s(), mrb_obj_as_string(), mrb_inspect() always return a
string.
Diffstat (limited to 'src/variable.c')
| -rw-r--r-- | src/variable.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/variable.c b/src/variable.c index 1b2ad56a7..efe6fad12 100644 --- a/src/variable.c +++ b/src/variable.c @@ -609,7 +609,7 @@ inspect_i(mrb_state *mrb, mrb_sym sym, mrb_value v, void *p) else { ins = mrb_inspect(mrb, v); } - mrb_str_append(mrb, str, ins); + mrb_str_cat_str(mrb, str, ins); return 0; } |
