From c439d4bb117ebcc59bd34711326ebb5090b2da2a Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 29 Jul 2015 06:21:54 -0700 Subject: * stream.c (common_destroy): Function removed. (stdio_stream_destroy, dir_destroy): Call close_stream directly. --- stream.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'stream.c') diff --git a/stream.c b/stream.c index 022d274a..67fcee0e 100644 --- a/stream.c +++ b/stream.c @@ -67,11 +67,6 @@ val from_start_k, from_current_k, from_end_k; val real_time_k, name_k, fd_k; val format_s; -static void common_destroy(val obj) -{ - (void) close_stream(obj, nil); -} - void stream_print_op(val stream, val out) { val name = stream_get_prop(stream, name_k); @@ -291,7 +286,7 @@ static void stdio_stream_print(val stream, val out) static void stdio_stream_destroy(val stream) { struct stdio_handle *h = coerce(struct stdio_handle *, stream->co.handle); - common_destroy(stream); + close_stream(stream, nil); free(h); } @@ -1093,7 +1088,7 @@ struct dir_handle { static void dir_destroy(val stream) { struct dir_handle *h = coerce(struct dir_handle *, stream->co.handle); - common_destroy(stream); + close_stream(stream, nil); free(h); } -- cgit v1.2.3