summaryrefslogtreecommitdiffstats
path: root/stream.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-07-29 06:21:54 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-07-29 06:21:54 -0700
commitc439d4bb117ebcc59bd34711326ebb5090b2da2a (patch)
treeb71f5c5ec9985341fa69874901094979c58459ef /stream.c
parent7a61fe49795002a604094c4f7f9612cabbb30d4a (diff)
downloadtxr-c439d4bb117ebcc59bd34711326ebb5090b2da2a.tar.gz
txr-c439d4bb117ebcc59bd34711326ebb5090b2da2a.tar.bz2
txr-c439d4bb117ebcc59bd34711326ebb5090b2da2a.zip
* stream.c (common_destroy): Function removed.
(stdio_stream_destroy, dir_destroy): Call close_stream directly.
Diffstat (limited to 'stream.c')
-rw-r--r--stream.c9
1 files changed, 2 insertions, 7 deletions
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);
}