From fadcad2d7f13ba925f80286e6f9e298c534206c7 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Sun, 12 Jan 2014 16:06:57 +0900 Subject: [PATCH] C APIs to modify global varaibles --- include/picrin.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/picrin.h b/include/picrin.h index bbde8010..053f13ec 100644 --- a/include/picrin.h +++ b/include/picrin.h @@ -97,6 +97,10 @@ void pic_gc_arena_restore(pic_state *, int); pic_state *pic_open(int argc, char *argv[], char **envp); void pic_close(pic_state *); +void pic_define(pic_state *, struct pic_lib *, const char *, pic_value); /* symbol is automatically exported */ +pic_value pic_ref(pic_state *, struct pic_lib *, const char *); +pic_value pic_set(pic_state *, struct pic_lib *, const char *, pic_value); + struct pic_proc *pic_get_proc(pic_state *); int pic_get_args(pic_state *, const char *, ...); void pic_defun(pic_state *, const char *, pic_func_t);