mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #4568 from shuujii/remove-an-unused-argument-of-str_with_class
Remove an unused argument of `str_with_class()`
This commit is contained in:
+5
-5
@@ -83,7 +83,7 @@ str_new(mrb_state *mrb, const char *p, size_t len)
|
||||
}
|
||||
|
||||
static inline void
|
||||
str_with_class(mrb_state *mrb, struct RString *s, mrb_value obj)
|
||||
str_with_class(struct RString *s, mrb_value obj)
|
||||
{
|
||||
s->c = mrb_str_ptr(obj)->c;
|
||||
}
|
||||
@@ -93,7 +93,7 @@ mrb_str_new_empty(mrb_state *mrb, mrb_value str)
|
||||
{
|
||||
struct RString *s = str_new(mrb, 0, 0);
|
||||
|
||||
str_with_class(mrb, s, str);
|
||||
str_with_class(s, str);
|
||||
return mrb_obj_value(s);
|
||||
}
|
||||
|
||||
@@ -830,7 +830,7 @@ mrb_str_times(mrb_state *mrb, mrb_value self)
|
||||
|
||||
len = RSTRING_LEN(self)*times;
|
||||
str2 = str_new(mrb, 0, len);
|
||||
str_with_class(mrb, str2, self);
|
||||
str_with_class(str2, self);
|
||||
p = RSTR_PTR(str2);
|
||||
if (len > 0) {
|
||||
n = RSTRING_LEN(self);
|
||||
@@ -1011,7 +1011,7 @@ mrb_str_dup(mrb_state *mrb, mrb_value str)
|
||||
struct RString *s = mrb_str_ptr(str);
|
||||
struct RString *dup = str_new(mrb, 0, 0);
|
||||
|
||||
str_with_class(mrb, dup, str);
|
||||
str_with_class(dup, str);
|
||||
return str_replace(mrb, dup, s);
|
||||
}
|
||||
|
||||
@@ -2561,7 +2561,7 @@ mrb_str_dump(mrb_state *mrb, mrb_value str)
|
||||
}
|
||||
|
||||
result = str_new(mrb, 0, len);
|
||||
str_with_class(mrb, result, str);
|
||||
str_with_class(result, str);
|
||||
p = RSTRING_PTR(str); pend = p + RSTRING_LEN(str);
|
||||
q = RSTR_PTR(result);
|
||||
*q++ = '"';
|
||||
|
||||
Reference in New Issue
Block a user