From e10802b5e8b334ed080bab64c9f8ba049442530f Mon Sep 17 00:00:00 2001 From: Daniel Kochmanski Date: Sun, 23 Sep 2018 14:42:09 +0200 Subject: [PATCH] broadcast-stream: delegate file-* functions to the last component. Fixes #452. --- src/c/file.d | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/c/file.d b/src/c/file.d index 235c95be9..ce4167baa 100755 --- a/src/c/file.d +++ b/src/c/file.d @@ -1932,7 +1932,7 @@ broadcast_length(cl_object strm) cl_object l = BROADCAST_STREAM_LIST(strm); if (Null(l)) return ecl_make_fixnum(0); - return ecl_file_length(ECL_CONS_CAR(l)); + return ecl_file_length(ECL_CONS_CAR(ecl_last(l, 1))); } static cl_object @@ -1941,7 +1941,7 @@ broadcast_get_position(cl_object strm) cl_object l = BROADCAST_STREAM_LIST(strm); if (Null(l)) return ecl_make_fixnum(0); - return ecl_file_position(ECL_CONS_CAR(l)); + return ecl_file_position(ECL_CONS_CAR(ecl_last(l, 1))); } static cl_object @@ -4807,6 +4807,7 @@ cl_file_string_length(cl_object stream, cl_object string) if (Null(stream)) { @(return ecl_make_fixnum(1)); } else { + stream = ECL_CONS_CAR(ecl_last(stream, 1)); goto BEGIN; } }