s/make_library/open_library/g
This commit is contained in:
parent
a4c82f10d2
commit
1e8ab8bf0f
|
@ -177,7 +177,7 @@ struct pic_proc *pic_compile(pic_state *, pic_value, struct pic_lib *);
|
|||
pic_value pic_macroexpand(pic_state *, pic_value, struct pic_lib *);
|
||||
|
||||
void pic_in_library(pic_state *, pic_value);
|
||||
struct pic_lib *pic_make_library(pic_state *, pic_value);
|
||||
struct pic_lib *pic_open_library(pic_state *, pic_value);
|
||||
struct pic_lib *pic_find_library(pic_state *, pic_value);
|
||||
|
||||
#define pic_deflibrary(pic, spec) \
|
||||
|
@ -185,7 +185,7 @@ struct pic_lib *pic_find_library(pic_state *, pic_value);
|
|||
#define pic_deflibrary_helper__(pic, i, prev_lib, spec) \
|
||||
for (int i = 0; ! i; ) \
|
||||
for (struct pic_lib *prev_lib; ! i; ) \
|
||||
for ((prev_lib = pic->lib), pic_make_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_export(pic_state *, pic_sym);
|
||||
|
|
4
lib.c
4
lib.c
|
@ -11,7 +11,7 @@
|
|||
#include "picrin/string.h"
|
||||
|
||||
struct pic_lib *
|
||||
pic_make_library(pic_state *pic, pic_value name)
|
||||
pic_open_library(pic_state *pic, pic_value name)
|
||||
{
|
||||
struct pic_lib *lib;
|
||||
struct pic_senv *senv;
|
||||
|
@ -239,7 +239,7 @@ pic_lib_define_library(pic_state *pic)
|
|||
|
||||
pic_get_args(pic, "o*", &spec, &argc, &argv);
|
||||
|
||||
pic_make_library(pic, spec);
|
||||
pic_open_library(pic, spec);
|
||||
|
||||
pic_try {
|
||||
pic_in_library(pic, spec);
|
||||
|
|
4
state.c
4
state.c
|
@ -144,8 +144,8 @@ pic_open(int argc, char *argv[], char **envp)
|
|||
pic_init_reader(pic);
|
||||
|
||||
/* standard libraries */
|
||||
pic->PICRIN_BASE = pic_make_library(pic, pic_read_cstr(pic, "(picrin base)"));
|
||||
pic->PICRIN_USER = pic_make_library(pic, pic_read_cstr(pic, "(picrin user)"));
|
||||
pic->PICRIN_BASE = pic_open_library(pic, pic_read_cstr(pic, "(picrin base)"));
|
||||
pic->PICRIN_USER = pic_open_library(pic, pic_read_cstr(pic, "(picrin user)"));
|
||||
pic->lib = pic->PICRIN_USER;
|
||||
|
||||
pic_init_core(pic);
|
||||
|
|
Loading…
Reference in New Issue