summaryrefslogtreecommitdiffhomepage
path: root/src/string.c
diff options
context:
space:
mode:
authorTatsuhiko Kubo <[email protected]>2014-08-28 19:18:52 +0900
committerTatsuhiko Kubo <[email protected]>2014-08-28 19:18:52 +0900
commitdb29a25ada6f8e344f63586328a7c45ef6bcc67d (patch)
treeb51640e01e99ebc8d35745ffc486bb42c95e91c2 /src/string.c
parentd958aa2cb1c250cb20e444f834773af311810908 (diff)
downloadmruby-db29a25ada6f8e344f63586328a7c45ef6bcc67d.tar.gz
mruby-db29a25ada6f8e344f63586328a7c45ef6bcc67d.zip
Rename functions for avoinding symbol confiliction.
Add prefix(mrb) to noregexp() and regexp_check().
Diffstat (limited to 'src/string.c')
-rw-r--r--src/string.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/string.c b/src/string.c
index 6cb580f73..77d5e8580 100644
--- a/src/string.c
+++ b/src/string.c
@@ -638,16 +638,16 @@ mrb_string_value_ptr(mrb_state *mrb, mrb_value ptr)
}
void
-noregexp(mrb_state *mrb, mrb_value self)
+mrb_noregexp(mrb_state *mrb, mrb_value self)
{
mrb_raise(mrb, E_NOTIMP_ERROR, "Regexp class not implemented");
}
void
-regexp_check(mrb_state *mrb, mrb_value obj)
+mrb_regexp_check(mrb_state *mrb, mrb_value obj)
{
if (mrb_regexp_p(mrb, obj)) {
- noregexp(mrb, obj);
+ mrb_noregexp(mrb, obj);
}
}
@@ -737,7 +737,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);
@@ -819,7 +819,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 mrb_str_substr(mrb, str, mrb_fixnum(a1), mrb_fixnum(a2));
}
if (argc != 1) {
@@ -1283,7 +1283,7 @@ mrb_str_index_m(mrb_state *mrb, mrb_value str)
else
sub = mrb_nil_value();
}
- regexp_check(mrb, sub);
+ mrb_regexp_check(mrb, sub);
if (pos < 0) {
pos += RSTRING_LEN(str);
if (pos < 0) {
@@ -1622,7 +1622,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();
}
}
@@ -1635,7 +1635,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);
switch (mrb_type(sub)) {
case MRB_TT_FIXNUM: {
@@ -1745,7 +1745,7 @@ mrb_str_split_m(mrb_state *mrb, mrb_value str)
}
}
else {
- noregexp(mrb, str);
+ mrb_noregexp(mrb, str);
}
}
@@ -1814,7 +1814,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) {