pic_list_p don't need to take pic_state *.

This commit is contained in:
Yuichi Nishiwaki 2014-03-16 23:12:07 +09:00
parent 27d4853aef
commit 8598042deb
4 changed files with 5 additions and 7 deletions

View File

@ -22,7 +22,7 @@ pic_value pic_cons(pic_state *, pic_value, pic_value);
pic_value pic_car(pic_state *, pic_value); pic_value pic_car(pic_state *, pic_value);
pic_value pic_cdr(pic_state *, pic_value); pic_value pic_cdr(pic_state *, pic_value);
bool pic_list_p(pic_state *, pic_value); bool pic_list_p(pic_value);
pic_value pic_list1(pic_state *, pic_value); pic_value pic_list1(pic_state *, pic_value);
pic_value pic_list2(pic_state *, pic_value, pic_value); pic_value pic_list2(pic_state *, pic_value, pic_value);
pic_value pic_list3(pic_state *, pic_value, pic_value, pic_value); pic_value pic_list3(pic_state *, pic_value, pic_value, pic_value);

View File

@ -303,7 +303,7 @@ analyze_node(analyze_state *state, pic_value obj, bool tailpos)
case PIC_TT_PAIR: { case PIC_TT_PAIR: {
pic_value proc; pic_value proc;
if (! pic_list_p(pic, obj)) { if (! pic_list_p(obj)) {
pic_errorf(pic, "invalid expression given: ~s", obj); pic_errorf(pic, "invalid expression given: ~s", obj);
} }

View File

@ -46,13 +46,11 @@ pic_cdr(pic_state *pic, pic_value obj)
} }
bool bool
pic_list_p(pic_state *pic, pic_value obj) pic_list_p(pic_value obj)
{ {
pic_value local, rapid; pic_value local, rapid;
int i; int i;
UNUSED(pic);
/* Floyd's cycle-finding algorithm. */ /* Floyd's cycle-finding algorithm. */
local = rapid = obj; local = rapid = obj;
@ -443,7 +441,7 @@ pic_pair_list_p(pic_state *pic)
pic_get_args(pic, "o", &v); pic_get_args(pic, "o", &v);
return pic_bool_value(pic_list_p(pic, v)); return pic_bool_value(pic_list_p(v));
} }
static pic_value static pic_value

View File

@ -419,7 +419,7 @@ pic_apply(pic_state *pic, struct pic_proc *proc, pic_value argv)
goto L_RAISE; goto L_RAISE;
} }
if (! pic_list_p(pic, argv)) { if (! pic_list_p(argv)) {
pic_error(pic, "argv must be a proper list"); pic_error(pic, "argv must be a proper list");
} }