ansi: return NIL for file-string-length if can't determine it.

Previously we returned error for streams which are not file streams. We could
try to loose this test for ECL_ANSI_STREAM_P, but that would require confirming,
that all ECL's ANSI streams have string encoders defined.
This commit is contained in:
Daniel Kochmanski 2018-09-23 15:08:07 +02:00
parent e10802b5e8
commit a1875da85a

View file

@ -4812,7 +4812,8 @@ cl_file_string_length(cl_object stream, cl_object string)
}
}
unlikely_if (!ECL_FILE_STREAM_P(stream)) {
not_a_file_stream(stream);
/* Spec says, that if cannot be determined we return NIL. */
return ECL_NIL;
}
switch (ecl_t_of(string)) {
#ifdef ECL_UNICODE