READ-BYTE now works with STREAM-READ-BYTE also when the latter reaches an EOF

This commit is contained in:
Juan Jose Garcia Ripoll 2008-12-15 16:50:58 +01:00
parent 5a8e6ad8b6
commit 53864b189f
2 changed files with 6 additions and 2 deletions

View file

@ -200,7 +200,7 @@ ECL 8.9.0:
- Hash tables were not properly serialized.
- WRITE/READ-LINE did not work with gray streams (A. Vodonosov)
- WRITE/READ-LINE and READ-BYTE did not work with gray streams (A. Vodonosov)
- When working with Gray streams, READ-LINE did not handle the EOF properly.

View file

@ -994,7 +994,11 @@ ecl_read_byte(cl_object strm)
BEGIN:
#ifdef ECL_CLOS_STREAMS
if (ECL_INSTANCEP(strm)) {
return funcall(2, @'gray::stream-read-byte', strm);
cl_object b = funcall(2, @'gray::stream-read-byte', strm);
if (FIXNUMP(b) || type_of(b) == t_bignum) {
return b;
}
return Cnil;
}
#endif
if (type_of(strm) != t_stream)