Merge pull request #2686 from cubicdaiya/use-suitable-type

Use suitable type.
This commit is contained in:
Yukihiro "Matz" Matsumoto
2014-12-27 20:12:09 +09:00
+2 -2
View File
@@ -1310,7 +1310,7 @@ mrb_str_index_m(mrb_state *mrb, mrb_value str)
switch (mrb_type(sub)) {
case MRB_TT_FIXNUM: {
int c = mrb_fixnum(sub);
mrb_int c = mrb_fixnum(sub);
mrb_int len = RSTRING_LEN(str);
unsigned char *p = (unsigned char*)RSTRING_PTR(str);
@@ -1656,7 +1656,7 @@ mrb_str_rindex_m(mrb_state *mrb, mrb_value str)
switch (mrb_type(sub)) {
case MRB_TT_FIXNUM: {
int c = mrb_fixnum(sub);
mrb_int c = mrb_fixnum(sub);
unsigned char *p = (unsigned char*)RSTRING_PTR(str);
for (pos=len-1;pos>=0;pos--) {