Commit f6837783 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #2123 from take-cheeze/mrb_int_arg

Use mrb_int in mrbgem rest arguments getting.
parents c236d779 b5028421
...@@ -23,7 +23,8 @@ static mrb_value ...@@ -23,7 +23,8 @@ static mrb_value
hash_values_at(mrb_state *mrb, mrb_value hash) hash_values_at(mrb_state *mrb, mrb_value hash)
{ {
mrb_value *argv, result; mrb_value *argv, result;
int argc, i, ai; mrb_int argc, i;
int ai;
mrb_get_args(mrb, "*", &argv, &argc); mrb_get_args(mrb, "*", &argv, &argc);
result = mrb_ary_new_capa(mrb, argc); result = mrb_ary_new_capa(mrb, argc);
......
...@@ -63,7 +63,7 @@ static mrb_value ...@@ -63,7 +63,7 @@ static mrb_value
mrb_obj_instance_exec(mrb_state *mrb, mrb_value self) mrb_obj_instance_exec(mrb_state *mrb, mrb_value self)
{ {
mrb_value *argv; mrb_value *argv;
int argc; mrb_int argc;
mrb_value blk; mrb_value blk;
struct RClass *c; struct RClass *c;
......
...@@ -471,7 +471,7 @@ get_hash(mrb_state *mrb, mrb_value *hash, int argc, const mrb_value *argv) ...@@ -471,7 +471,7 @@ get_hash(mrb_state *mrb, mrb_value *hash, int argc, const mrb_value *argv)
mrb_value mrb_value
mrb_f_sprintf(mrb_state *mrb, mrb_value obj) mrb_f_sprintf(mrb_state *mrb, mrb_value obj)
{ {
int argc; mrb_int argc;
mrb_value *argv; mrb_value *argv;
mrb_get_args(mrb, "*", &argv, &argc); mrb_get_args(mrb, "*", &argv, &argc);
......
...@@ -113,7 +113,7 @@ static mrb_value ...@@ -113,7 +113,7 @@ static mrb_value
mrb_str_start_with(mrb_state *mrb, mrb_value self) mrb_str_start_with(mrb_state *mrb, mrb_value self)
{ {
mrb_value *argv, sub; mrb_value *argv, sub;
int argc, i; mrb_int argc, i;
mrb_get_args(mrb, "*", &argv, &argc); mrb_get_args(mrb, "*", &argv, &argc);
for (i = 0; i < argc; i++) { for (i = 0; i < argc; i++) {
...@@ -142,7 +142,7 @@ static mrb_value ...@@ -142,7 +142,7 @@ static mrb_value
mrb_str_end_with(mrb_state *mrb, mrb_value self) mrb_str_end_with(mrb_state *mrb, mrb_value self)
{ {
mrb_value *argv, sub; mrb_value *argv, sub;
int argc, i; mrb_int argc, i;
mrb_get_args(mrb, "*", &argv, &argc); mrb_get_args(mrb, "*", &argv, &argc);
for (i = 0; i < argc; i++) { for (i = 0; i < argc; i++) {
......
...@@ -356,7 +356,7 @@ static mrb_value ...@@ -356,7 +356,7 @@ static mrb_value
mrb_str_index_m(mrb_state *mrb, mrb_value str) mrb_str_index_m(mrb_state *mrb, mrb_value str)
{ {
mrb_value *argv; mrb_value *argv;
int argc; mrb_int argc;
mrb_value sub; mrb_value sub;
mrb_int pos; mrb_int pos;
...@@ -440,7 +440,7 @@ static mrb_value ...@@ -440,7 +440,7 @@ static mrb_value
mrb_str_rindex_m(mrb_state *mrb, mrb_value str) mrb_str_rindex_m(mrb_state *mrb, mrb_value str)
{ {
mrb_value *argv; mrb_value *argv;
int argc; mrb_int argc;
mrb_value sub; mrb_value sub;
mrb_value vpos; mrb_value vpos;
mrb_int pos, len = RSTRING_LEN(str); mrb_int pos, len = RSTRING_LEN(str);
......
...@@ -347,7 +347,7 @@ mrb_struct_s_def(mrb_state *mrb, mrb_value klass) ...@@ -347,7 +347,7 @@ mrb_struct_s_def(mrb_state *mrb, mrb_value klass)
mrb_value b, st; mrb_value b, st;
mrb_sym id; mrb_sym id;
mrb_value *argv; mrb_value *argv;
int argc; mrb_int argc;
name = mrb_nil_value(); name = mrb_nil_value();
rest = mrb_nil_value(); rest = mrb_nil_value();
...@@ -428,7 +428,7 @@ static mrb_value ...@@ -428,7 +428,7 @@ static mrb_value
mrb_struct_initialize_m(mrb_state *mrb, /*int argc, mrb_value *argv,*/ mrb_value self) mrb_struct_initialize_m(mrb_state *mrb, /*int argc, mrb_value *argv,*/ mrb_value self)
{ {
mrb_value *argv; mrb_value *argv;
int argc; mrb_int argc;
mrb_get_args(mrb, "*", &argv, &argc); mrb_get_args(mrb, "*", &argv, &argc);
return mrb_struct_initialize_withArg(mrb, argc, argv, self); return mrb_struct_initialize_withArg(mrb, argc, argv, self);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment