generalized attribute

This commit is contained in:
Yuichi Nishiwaki 2014-09-25 19:12:56 +09:00
parent cc45ffadc3
commit 9d694ac5ae
2 changed files with 4 additions and 4 deletions

View File

@ -214,7 +214,7 @@ cont_call(pic_state *pic)
proc = pic_get_proc(pic);
pic_get_args(pic, "*", &argc, &argv);
cont = pic_data_ptr(pic_attr_ref(pic, proc, "@@cont"))->data;
cont = pic_data_ptr(pic_attr_ref(pic, pic_obj_value(proc), "@@cont"))->data;
cont->results = pic_list_by_array(pic, argc, argv);
/* execute guard handlers */
@ -241,7 +241,7 @@ pic_callcc(pic_state *pic, struct pic_proc *proc)
dat = pic_data_alloc(pic, &cont_type, cont);
/* save the continuation object in proc */
pic_attr_set(pic, c, "@@cont", pic_obj_value(dat));
pic_attr_set(pic, pic_obj_value(c), "@@cont", pic_obj_value(dat));
return pic_apply1(pic, proc, pic_obj_value(c));
}
@ -265,7 +265,7 @@ pic_callcc_trampoline(pic_state *pic, struct pic_proc *proc)
dat = pic_data_alloc(pic, &cont_type, cont);
/* save the continuation object in proc */
pic_attr_set(pic, c, "@@cont", pic_obj_value(dat));
pic_attr_set(pic, pic_obj_value(c), "@@cont", pic_obj_value(dat));
return pic_apply_trampoline(pic, proc, pic_list1(pic, pic_obj_value(c)));
}

@ -1 +1 @@
Subproject commit 6fc8341f50fef9e3be0763e3a61f0f44a3e6b502
Subproject commit d33a98cd412f41005e0aa9ef99aa7d37ea7ff806