var_new -> make_var

This commit is contained in:
Yuichi Nishiwaki 2014-09-12 19:54:21 +09:00
parent df4bc3838b
commit 642bd10fb3
3 changed files with 6 additions and 6 deletions

View File

@ -18,7 +18,7 @@ struct pic_var {
#define pic_var_p(o) (pic_type(o) == PIC_TT_VAR)
#define pic_var_ptr(o) ((struct pic_var *)pic_ptr(o))
struct pic_var *pic_var_new(pic_state *, pic_value, struct pic_proc * /* = NULL */);
struct pic_var *pic_make_var(pic_state *, pic_value, struct pic_proc * /* = NULL */);
pic_value pic_var_ref(pic_state *, struct pic_var *);
void pic_var_set(pic_state *, struct pic_var *, pic_value);

6
port.c
View File

@ -682,9 +682,9 @@ pic_port_flush(pic_state *pic)
void
pic_init_port(pic_state *pic)
{
pic_define(pic, "current-input-port", pic_obj_value(pic_var_new(pic, pic_obj_value(pic->xSTDIN), NULL)));
pic_define(pic, "current-output-port", pic_obj_value(pic_var_new(pic, pic_obj_value(pic->xSTDOUT), NULL)));
pic_define(pic, "current-error-port", pic_obj_value(pic_var_new(pic, pic_obj_value(pic->xSTDERR), NULL)));
pic_define(pic, "current-input-port", pic_obj_value(pic_make_var(pic, pic_obj_value(pic->xSTDIN), NULL)));
pic_define(pic, "current-output-port", pic_obj_value(pic_make_var(pic, pic_obj_value(pic->xSTDOUT), NULL)));
pic_define(pic, "current-error-port", pic_obj_value(pic_make_var(pic, pic_obj_value(pic->xSTDERR), NULL)));
pic_defun(pic, "call-with-port", pic_port_call_with_port);

4
var.c
View File

@ -7,7 +7,7 @@
#include "picrin/pair.h"
struct pic_var *
pic_var_new(pic_state *pic, pic_value init, struct pic_proc *conv)
pic_make_var(pic_state *pic, pic_value init, struct pic_proc *conv)
{
struct pic_var *var;
@ -58,7 +58,7 @@ pic_var_make_parameter(pic_state *pic)
pic_get_args(pic, "o|l", &init, &conv);
return pic_obj_value(pic_var_new(pic, init, conv));
return pic_obj_value(pic_make_var(pic, init, conv));
}
static pic_value