pic_length should return int type
This commit is contained in:
parent
98034b5038
commit
cc952404c5
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue