s/make_library/open_library/g

This commit is contained in:
Yuichi Nishiwaki 2014-09-01 13:07:38 +09:00
parent a4c82f10d2
commit 1e8ab8bf0f
3 changed files with 6 additions and 6 deletions

View File

@ -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
View File

@ -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);

View File

@ -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);