add pic_import_library

This commit is contained in:
Yuichi Nishiwaki 2014-09-14 18:14:23 +09:00
parent 78b3cb8c6e
commit 0fe6e3dc7b
2 changed files with 7 additions and 0 deletions

View File

@ -195,6 +195,7 @@ struct pic_lib *pic_find_library(pic_state *, pic_value);
for ((prev_lib = pic->lib), pic_open_library(pic, pic_read_cstr(pic, spec)), pic_in_library(pic, pic_read_cstr(pic, spec)); ! i++; pic->lib = prev_lib)
void pic_import(pic_state *, pic_value);
void pic_import_library(pic_state *, struct pic_lib *);
void pic_export(pic_state *, pic_sym);
noreturn void pic_abort(pic_state *, const char *);

6
lib.c
View File

@ -190,6 +190,12 @@ pic_import(pic_state *pic, pic_value spec)
import(pic, spec);
}
void
pic_import_library(pic_state *pic, struct pic_lib *lib)
{
import(pic, lib->name);
}
void
pic_export(pic_state *pic, pic_sym sym)
{