From 8d7f63d71e4b3fbec1f55f33d3b0258bdd0b3e95 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Tue, 16 Sep 2014 16:20:03 +0900 Subject: [PATCH] update benz (funcall API change) --- extlib/benz | 2 +- src/main.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/extlib/benz b/extlib/benz index 678d2484..db5a4e36 160000 --- a/extlib/benz +++ b/extlib/benz @@ -1 +1 @@ -Subproject commit 678d2484ec989b082d0db2dffda5d0a391cecc50 +Subproject commit db5a4e367b86d76c6be993ed4ffe611385465d5d diff --git a/src/main.c b/src/main.c index 11b79347..fe3a2647 100644 --- a/src/main.c +++ b/src/main.c @@ -56,15 +56,17 @@ int main(int argc, char *argv[], char **envp) { pic_state *pic; + struct pic_lib *PICRIN_MAIN; int status = 0; pic = pic_open(argc, argv, envp); pic_init_picrin(pic); + PICRIN_MAIN = pic_find_library(pic, pic_read_cstr(pic, "(picrin main)")); + pic_try { - pic_import(pic, pic_read_cstr(pic, "(picrin main)")); - pic_funcall(pic, "main", pic_nil_value()); + pic_funcall(pic, PICRIN_MAIN, "main", pic_nil_value()); } pic_catch { pic_print_backtrace(pic, pic->err);