diff --git a/include/picrin/var.h b/include/picrin/var.h index d3bbaf4e..556647a8 100644 --- a/include/picrin/var.h +++ b/include/picrin/var.h @@ -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); diff --git a/port.c b/port.c index 84cbfaff..94641c06 100644 --- a/port.c +++ b/port.c @@ -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); diff --git a/var.c b/var.c index 71f605e8..a91245ef 100644 --- a/var.c +++ b/var.c @@ -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