adjustment. amending for argc type change

This commit is contained in:
Yuichi Nishiwaki 2014-09-26 17:13:17 +09:00
parent 7ab9708ed0
commit 7b0ec3adde
2 changed files with 6 additions and 8 deletions

2
blob.c
View File

@ -39,7 +39,7 @@ pic_blob_bytevector(pic_state *pic)
pic_get_args(pic, "*", &argc, &argv);
blob = pic_make_blob(pic, argc);
blob = pic_make_blob(pic, (size_t)argc);
data = blob->data;

View File

@ -57,7 +57,7 @@ pic_vec_vector(pic_state *pic)
pic_get_args(pic, "*", &argc, &argv);
vec = pic_make_vec(pic, argc);
vec = pic_make_vec(pic, (size_t)argc);
for (i = 0; i < argc; ++i) {
vec->data[i] = argv[i];
@ -243,14 +243,13 @@ static pic_value
pic_vec_vector_map(pic_state *pic)
{
struct pic_proc *proc;
int argc, i;
int argc, i, len, j;
pic_value *argv, vals;
size_t len, j;
pic_vec *vec;
pic_get_args(pic, "l*", &proc, &argc, &argv);
len = SIZE_MAX;
len = INT_MAX;
for (i = 0; i < argc; ++i) {
pic_assert_type(pic, argv[i], vec);
@ -276,13 +275,12 @@ static pic_value
pic_vec_vector_for_each(pic_state *pic)
{
struct pic_proc *proc;
int argc, i;
int argc, i, len, j;
pic_value *argv, vals;
size_t len, j;
pic_get_args(pic, "l*", &proc, &argc, &argv);
len = SIZE_MAX;
len = INT_MAX;
for (i = 0; i < argc; ++i) {
pic_assert_type(pic, argv[i], vec);