mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Rename functions for avoinding symbol confiliction.
Add prefix(mrb) to noregexp() and regexp_check().
This commit is contained in:
@@ -255,7 +255,7 @@ mrb_str_aref(mrb_state *mrb, mrb_value str, mrb_value indx)
|
||||
{
|
||||
mrb_int idx;
|
||||
|
||||
regexp_check(mrb, indx);
|
||||
mrb_regexp_check(mrb, indx);
|
||||
switch (mrb_type(indx)) {
|
||||
case MRB_TT_FIXNUM:
|
||||
idx = mrb_fixnum(indx);
|
||||
@@ -300,7 +300,7 @@ mrb_str_aref_m(mrb_state *mrb, mrb_value str)
|
||||
|
||||
argc = mrb_get_args(mrb, "o|o", &a1, &a2);
|
||||
if (argc == 2) {
|
||||
regexp_check(mrb, a1);
|
||||
mrb_regexp_check(mrb, a1);
|
||||
return str_substr(mrb, str, mrb_fixnum(a1), mrb_fixnum(a2));
|
||||
}
|
||||
if (argc != 1) {
|
||||
@@ -331,7 +331,7 @@ mrb_str_index_m(mrb_state *mrb, mrb_value str)
|
||||
sub = mrb_nil_value();
|
||||
|
||||
}
|
||||
regexp_check(mrb, sub);
|
||||
mrb_regexp_check(mrb, sub);
|
||||
if (pos < 0) {
|
||||
pos += RSTRING_LEN(str);
|
||||
if (pos < 0) {
|
||||
@@ -410,7 +410,7 @@ mrb_str_rindex_m(mrb_state *mrb, mrb_value str)
|
||||
if (pos < 0) {
|
||||
pos += len;
|
||||
if (pos < 0) {
|
||||
regexp_check(mrb, sub);
|
||||
mrb_regexp_check(mrb, sub);
|
||||
return mrb_nil_value();
|
||||
}
|
||||
}
|
||||
@@ -423,7 +423,7 @@ mrb_str_rindex_m(mrb_state *mrb, mrb_value str)
|
||||
else
|
||||
sub = mrb_nil_value();
|
||||
}
|
||||
regexp_check(mrb, sub);
|
||||
mrb_regexp_check(mrb, sub);
|
||||
|
||||
if (mrb_type(sub) == MRB_TT_FIXNUM) {
|
||||
sub = mrb_fixnum_chr(mrb, sub);
|
||||
@@ -533,7 +533,7 @@ mrb_str_split_m(mrb_state *mrb, mrb_value str)
|
||||
}
|
||||
}
|
||||
else {
|
||||
noregexp(mrb, str);
|
||||
mrb_noregexp(mrb, str);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -603,7 +603,7 @@ mrb_str_split_m(mrb_state *mrb, mrb_value str)
|
||||
beg = ptr - temp;
|
||||
}
|
||||
else {
|
||||
noregexp(mrb, str);
|
||||
mrb_noregexp(mrb, str);
|
||||
}
|
||||
if (RSTRING_LEN(str) > 0 && (lim_p || RSTRING_LEN(str) > beg || lim < 0)) {
|
||||
if (RSTRING_LEN(str) == beg) {
|
||||
|
||||
Reference in New Issue
Block a user