mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 03:30:27 +02:00
* filesys.c (set_element, get_element): Make sure that `element'
is a cell before applying SCM_FPORTP to it. (Thanks to Jost Boekemeier and Jorgen "forcer" Schaefer.)
This commit is contained in:
parent
35fd439417
commit
6047d269f5
1 changed files with 2 additions and 2 deletions
|
@ -816,7 +816,7 @@ set_element (SELECT_TYPE *set, SCM element, int arg)
|
|||
{
|
||||
int fd;
|
||||
element = SCM_COERCE_OUTPORT (element);
|
||||
if (SCM_FPORTP (element) && SCM_OPPORTP (element))
|
||||
if (SCM_NIMP (element) && SCM_FPORTP (element) && SCM_OPPORTP (element))
|
||||
fd = fileno ((FILE *) SCM_STREAM (element));
|
||||
else {
|
||||
SCM_ASSERT (SCM_INUMP (element), element, arg, s_select);
|
||||
|
@ -861,7 +861,7 @@ static SCM
|
|||
get_element (SELECT_TYPE *set, SCM element, SCM list)
|
||||
{
|
||||
element = SCM_COERCE_OUTPORT (element);
|
||||
if (SCM_FPORTP (element) && SCM_OPPORTP (element))
|
||||
if (SCM_NIMP (element) && SCM_FPORTP (element) && SCM_OPPORTP (element))
|
||||
{
|
||||
if (FD_ISSET (fileno ((FILE *)SCM_STREAM (element)), set))
|
||||
list = scm_cons (element, list);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue