passing array with a pair of int and pic_value *

This commit is contained in:
Yuichi Nishiwaki 2014-09-26 17:09:52 +09:00
parent a75ff9f2b0
commit 7ab9708ed0
4 changed files with 11 additions and 11 deletions

14
cont.c
View File

@ -184,9 +184,9 @@ pic_values5(pic_state *pic, pic_value arg1, pic_value arg2, pic_value arg3, pic_
}
pic_value
pic_values_by_array(pic_state *pic, size_t argc, pic_value *argv)
pic_values_by_array(pic_state *pic, int argc, pic_value *argv)
{
size_t i;
int i;
for (i = 0; i < argc; ++i) {
pic->sp[i] = argv[i];
@ -200,7 +200,7 @@ pic_value
pic_values_by_list(pic_state *pic, pic_value list)
{
pic_value v;
size_t i;
int i;
i = 0;
pic_for_each (v, list) {
@ -211,11 +211,11 @@ pic_values_by_list(pic_state *pic, pic_value list)
return pic_nil_p(list) ? pic_none_value() : pic->sp[0];
}
size_t
pic_receive(pic_state *pic, size_t n, pic_value *argv)
int
pic_receive(pic_state *pic, int n, pic_value *argv)
{
pic_callinfo *ci;
size_t i, retc;
int i, retc;
/* take info from discarded frame */
ci = pic->ci + 1;
@ -263,7 +263,7 @@ static pic_value
pic_cont_call_with_values(pic_state *pic)
{
struct pic_proc *producer, *consumer;
size_t argc;
int argc;
pic_value args[256];
pic_get_args(pic, "ll", &producer, &consumer);

View File

@ -40,9 +40,9 @@ pic_value pic_values2(pic_state *, pic_value, pic_value);
pic_value pic_values3(pic_state *, pic_value, pic_value, pic_value);
pic_value pic_values4(pic_state *, pic_value, pic_value, pic_value, pic_value);
pic_value pic_values5(pic_state *, pic_value, pic_value, pic_value, pic_value, pic_value);
pic_value pic_values_by_array(pic_state *, size_t, pic_value *);
pic_value pic_values_by_array(pic_state *, int, pic_value *);
pic_value pic_values_by_list(pic_state *, pic_value);
size_t pic_receive(pic_state *, size_t, pic_value *);
int pic_receive(pic_state *, int, pic_value *);
pic_value pic_escape(pic_state *, struct pic_proc *);

View File

@ -56,7 +56,7 @@ pic_value pic_list4(pic_state *, pic_value, pic_value, pic_value, pic_value);
pic_value pic_list5(pic_state *, pic_value, pic_value, pic_value, pic_value, pic_value);
pic_value pic_list6(pic_state *, pic_value, pic_value, pic_value, pic_value, pic_value, pic_value);
pic_value pic_list7(pic_state *, pic_value, pic_value, pic_value, pic_value, pic_value, pic_value, pic_value);
pic_value pic_list_by_array(pic_state *, size_t, pic_value *);
pic_value pic_list_by_array(pic_state *, int, pic_value *);
pic_value pic_make_list(pic_state *, int, pic_value);
#define pic_for_each(var, list) \

2
pair.c
View File

@ -160,7 +160,7 @@ pic_list7(pic_state *pic, pic_value obj1, pic_value obj2, pic_value obj3, pic_va
}
pic_value
pic_list_by_array(pic_state *pic, size_t c, pic_value *vs)
pic_list_by_array(pic_state *pic, int c, pic_value *vs)
{
pic_value v;