mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-22 04:21:16 -08:00
printer: signal error in write-string if stream is not a character stream
Bug introduced in commit 5947970f6.
This commit is contained in:
parent
52acffae4a
commit
aa75969e33
1 changed files with 14 additions and 0 deletions
14
src/c/file.d
14
src/c/file.d
|
|
@ -186,6 +186,18 @@ not_character_write_char(cl_object strm, ecl_character c)
|
|||
return c;
|
||||
}
|
||||
|
||||
static ecl_character
|
||||
not_character_decoder(cl_object stream) {
|
||||
not_a_character_stream(stream);
|
||||
return EOF;
|
||||
}
|
||||
|
||||
static int
|
||||
not_character_encoder(cl_object stream, unsigned char *buffer, ecl_character c) {
|
||||
not_a_character_stream(stream);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
not_input_clear_input(cl_object strm)
|
||||
{
|
||||
|
|
@ -3159,6 +3171,8 @@ set_stream_elt_type(cl_object stream, cl_fixnum byte_size, int flags,
|
|||
stream->stream.format = t;
|
||||
stream->stream.ops->read_char = not_character_read_char;
|
||||
stream->stream.ops->write_char = not_character_write_char;
|
||||
stream->stream.decoder = not_character_decoder;
|
||||
stream->stream.encoder = not_character_encoder;
|
||||
break;
|
||||
#ifdef ECL_UNICODE
|
||||
/*case ECL_ISO_8859_1:*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue