mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-22 03:30:22 +02:00
* num2integral.i.c (NUM2INTEGRAL): Report an error when these
routines are passed an inexact. This change in behavior is motivated by concordance with R5RS: It is more common that a primitive doesn't want to accept an inexact for an exact.
This commit is contained in:
parent
9d7e6c84ca
commit
147c18a0e4
3 changed files with 20 additions and 11 deletions
|
@ -1,3 +1,14 @@
|
|||
2001-09-20 Mikael Djurfeldt <mdj@linnaeus>
|
||||
|
||||
* error.c, error.h: Made error keys globally accessible.
|
||||
Applications might want to test for these or use them in a direct
|
||||
call to scm_error.
|
||||
|
||||
* num2integral.i.c (NUM2INTEGRAL): Report an error when these
|
||||
routines are passed an inexact. This change in behavior is
|
||||
motivated by concordance with R5RS: It is more common that a
|
||||
primitive doesn't want to accept an inexact for an exact.
|
||||
|
||||
2001-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
|
||||
|
||||
The following patch partially undoes my patch from 2001-06-30,
|
||||
|
|
|
@ -69,16 +69,6 @@ NUM2INTEGRAL (SCM num, unsigned long int pos, const char *s_caller)
|
|||
|
||||
return res;
|
||||
}
|
||||
else if (SCM_REALP (num))
|
||||
{ /* inexact */
|
||||
|
||||
double u = SCM_REAL_VALUE (num);
|
||||
ITYPE res = u;
|
||||
if ((double) res == u)
|
||||
return res;
|
||||
else
|
||||
scm_out_of_range (s_caller, num);
|
||||
}
|
||||
else
|
||||
scm_wrong_type_arg (s_caller, pos, num);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue