pic_length should return int type

This commit is contained in:
Yuichi Nishiwaki 2015-08-26 18:16:33 +09:00
parent 98034b5038
commit cc952404c5
2 changed files with 3 additions and 3 deletions

View File

@ -66,7 +66,7 @@ pic_value pic_make_list(pic_state *, size_t, pic_value);
#define pic_push(pic, item, place) (place = pic_cons(pic, item, place))
#define pic_pop(pic, place) (place = pic_cdr(pic, place))
size_t pic_length(pic_state *, pic_value);
int pic_length(pic_state *, pic_value);
pic_value pic_reverse(pic_state *, pic_value);
pic_value pic_append(pic_state *, pic_value, pic_value);

View File

@ -182,10 +182,10 @@ pic_make_list(pic_state *pic, size_t k, pic_value fill)
return list;
}
size_t
int
pic_length(pic_state *pic, pic_value obj)
{
size_t c = 0;
int c = 0;
if (! pic_list_p(obj)) {
pic_errorf(pic, "length: expected list, but got ~s", obj);