summaryrefslogtreecommitdiffstats
path: root/stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'stream.c')
-rw-r--r--stream.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/stream.c b/stream.c
index ac14a83c..023e8390 100644
--- a/stream.c
+++ b/stream.c
@@ -680,6 +680,11 @@ val make_dir_stream(DIR *dir)
return cobj((mem_t *) dir, stream_s, &dir_ops.cobj_ops);
}
+val streamp(val obj)
+{
+ return typeof(obj) == stream_s ? t : nil;
+}
+
val close_stream(val stream, val throw_on_error)
{
type_check (stream, COBJ);