eval procedure now takes environment object for the second argument

This commit is contained in:
Yuichi Nishiwaki
2015-06-16 22:51:49 +09:00
parent eef74604d0
commit 4f69cb8ec3
4 changed files with 16 additions and 19 deletions
+5 -8
View File
@@ -17,16 +17,13 @@ pic_eval(pic_state *pic, pic_value program, struct pic_env *env)
static pic_value
pic_eval_eval(pic_state *pic)
{
pic_value program, spec;
struct pic_lib *lib;
pic_value program, env;
pic_get_args(pic, "oo", &program, &spec);
pic_get_args(pic, "oo", &program, &env);
lib = pic_find_library(pic, spec);
if (lib == NULL) {
pic_errorf(pic, "no library found: ~s", spec);
}
return pic_eval(pic, program, lib->env);
pic_assert_type(pic, env, env);
return pic_eval(pic, program, pic_env_ptr(env));
}
void