mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-30 04:10:44 -08:00
file-stream-fd: don't cause internal error
If the argument isn't a file-stream rise a SIMPLE-TYPE-ERROR condition. Fixes #271.
This commit is contained in:
parent
86a591461c
commit
af65969c0b
2 changed files with 8 additions and 3 deletions
|
|
@ -57,6 +57,10 @@ appropraite documentation section (new-doc).
|
|||
Function was obfuscated with ifdefs with non-even pairs of =#\{= and =#\}=.
|
||||
|
||||
** Issues fixed
|
||||
- ext:file-stream-fd
|
||||
Doesn't cause an internal-error if fed with not a file-stream (signals a
|
||||
SIMPLE-TYPE-ERROR condtition).
|
||||
|
||||
- stable-sort bugfix and improvement in speed
|
||||
Adapted from SBCL by Diogo Franco.
|
||||
|
||||
|
|
|
|||
|
|
@ -4201,8 +4201,9 @@ si_file_stream_fd(cl_object s)
|
|||
{
|
||||
cl_object ret;
|
||||
|
||||
unlikely_if (!ECL_ANSI_STREAM_P(s))
|
||||
FEerror("file_stream_fd: not a stream", 0);
|
||||
unlikely_if (!ECL_FILE_STREAM_P(s)) {
|
||||
not_a_file_stream(s);
|
||||
}
|
||||
|
||||
switch ((enum ecl_smmode)s->stream.mode) {
|
||||
case ecl_smm_input:
|
||||
|
|
@ -4218,7 +4219,7 @@ si_file_stream_fd(cl_object s)
|
|||
default:
|
||||
ecl_internal_error("not a file stream");
|
||||
}
|
||||
@(return ret);;
|
||||
@(return ret);
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue