add pic_import_library
This commit is contained in:
parent
78b3cb8c6e
commit
0fe6e3dc7b
|
@ -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)
|
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(pic_state *, pic_value);
|
||||||
|
void pic_import_library(pic_state *, struct pic_lib *);
|
||||||
void pic_export(pic_state *, pic_sym);
|
void pic_export(pic_state *, pic_sym);
|
||||||
|
|
||||||
noreturn void pic_abort(pic_state *, const char *);
|
noreturn void pic_abort(pic_state *, const char *);
|
||||||
|
|
6
lib.c
6
lib.c
|
@ -190,6 +190,12 @@ pic_import(pic_state *pic, pic_value spec)
|
||||||
import(pic, spec);
|
import(pic, spec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
pic_import_library(pic_state *pic, struct pic_lib *lib)
|
||||||
|
{
|
||||||
|
import(pic, lib->name);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
pic_export(pic_state *pic, pic_sym sym)
|
pic_export(pic_state *pic, pic_sym sym)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue