don't use pic_defvar
This commit is contained in:
+5
-3
@@ -684,9 +684,11 @@ pic_port_flush(pic_state *pic)
|
||||
void
|
||||
pic_init_port(pic_state *pic)
|
||||
{
|
||||
pic_defvar(pic, "current-input-port", port_new_stdport(pic, xstdin, PIC_PORT_IN));
|
||||
pic_defvar(pic, "current-output-port", port_new_stdport(pic, xstdout, PIC_PORT_OUT));
|
||||
pic_defvar(pic, "current-error-port", port_new_stdport(pic, xstderr, PIC_PORT_OUT));
|
||||
pic_deflibrary ("(picrin port)") {
|
||||
pic_define(pic, "standard-input-port", port_new_stdport(pic, xstdin, PIC_PORT_IN));
|
||||
pic_define(pic, "standard-output-port", port_new_stdport(pic, xstdout, PIC_PORT_OUT));
|
||||
pic_define(pic, "standard-error-port", port_new_stdport(pic, xstderr, PIC_PORT_OUT));
|
||||
}
|
||||
|
||||
pic_defun(pic, "input-port?", pic_port_input_port_p);
|
||||
pic_defun(pic, "output-port?", pic_port_output_port_p);
|
||||
|
||||
@@ -465,15 +465,6 @@ pic_defun(pic_state *pic, const char *name, pic_func_t cfunc)
|
||||
pic_define(pic, name, pic_obj_value(proc));
|
||||
}
|
||||
|
||||
void
|
||||
pic_defvar(pic_state *pic, const char *name, pic_value init)
|
||||
{
|
||||
struct pic_var *var;
|
||||
|
||||
var = pic_var_new(pic, init, NULL);
|
||||
pic_define(pic, name, pic_obj_value(pic_wrap_var(pic, var)));
|
||||
}
|
||||
|
||||
static void
|
||||
vm_push_env(pic_state *pic)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user