From 4a7a32829d8a8849183837fc76fd1bf1612385e9 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Mon, 13 Jan 2014 00:50:18 +0900 Subject: [PATCH] use the new feature of pic_get_args (port specifier) --- src/port.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/port.c b/src/port.c index afa84831..4a73d3ad 100644 --- a/src/port.c +++ b/src/port.c @@ -330,15 +330,9 @@ pic_port_eof_object(pic_state *pic) static pic_value pic_port_close_port(pic_state *pic) { - pic_value v; struct pic_port *port; - pic_get_args(pic, "o", &v); - - if (! pic_port_p(v)) { - pic_error(pic, "close-port: expected port"); - } - port = pic_port_ptr(v); + pic_get_args(pic, "p", &port); if (fclose(port->file) == EOF) { pic_error(pic, "close-port: failure");