From 2d80522230358a4f3f2a1cd1af56da16d0f612d0 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Tue, 9 Sep 2014 00:08:15 +0900 Subject: [PATCH] revert pic_open API --- include/picrin.h | 2 +- state.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/picrin.h b/include/picrin.h index a142f3c0..fff10cbb 100644 --- a/include/picrin.h +++ b/include/picrin.h @@ -134,7 +134,7 @@ void pic_gc_arena_restore(pic_state *, size_t); pic_gc_arena_restore(pic, ai); \ } while (0) -pic_state *pic_open(int argc, char *argv[], char **envp, xFILE *stdio[3]); +pic_state *pic_open(int argc, char *argv[], char **envp); void pic_close(pic_state *); void pic_define(pic_state *, const char *, pic_value); /* automatic export */ diff --git a/state.c b/state.c index 28ee47e1..0b2b5123 100644 --- a/state.c +++ b/state.c @@ -16,7 +16,7 @@ void pic_init_core(pic_state *); pic_state * -pic_open(int argc, char *argv[], char **envp, xFILE *stdio[3]) +pic_open(int argc, char *argv[], char **envp) { struct pic_port *pic_port_make_stdport(pic_state *, xFILE *, short); char t; @@ -156,9 +156,9 @@ pic_open(int argc, char *argv[], char **envp, xFILE *stdio[3]) pic->lib = pic->PICRIN_USER; /* standard I/O */ - pic->xSTDIN = pic_port_make_stdport(pic, stdio[0], PIC_PORT_IN); - pic->xSTDOUT = pic_port_make_stdport(pic, stdio[1], PIC_PORT_OUT); - pic->xSTDERR = pic_port_make_stdport(pic, stdio[2], PIC_PORT_OUT); + pic->xSTDIN = pic_port_make_stdport(pic, xstdin, PIC_PORT_IN); + pic->xSTDOUT = pic_port_make_stdport(pic, xstdout, PIC_PORT_OUT); + pic->xSTDERR = pic_port_make_stdport(pic, xstderr, PIC_PORT_OUT); pic_init_core(pic);