mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #2686 from cubicdaiya/use-suitable-type
Use suitable type.
This commit is contained in:
+2
-2
@@ -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--) {
|
||||
|
||||
Reference in New Issue
Block a user