mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-01 12:20:26 +02:00
Fix bytevectors VALIDATE_REAL to test for reals, not rationals
Reported and fixed by Daniel Llorens <dll@bluewin.ch>. * libguile/bytevectors.c (VALIDATE_REAL): Test for reals, not rationals. * test-suite/tests/srfi-4.test (f32 vectors, f64 vectors): Add tests.
This commit is contained in:
parent
0176bbb717
commit
ae255d65c3
2 changed files with 9 additions and 3 deletions
|
@ -1667,7 +1667,7 @@ double_from_foreign_endianness (const union scm_ieee754_double *source)
|
|||
/* FIXME: SCM_VALIDATE_REAL rejects integers, etc. grrr */
|
||||
#define VALIDATE_REAL(pos, v) \
|
||||
do { \
|
||||
SCM_ASSERT_TYPE (scm_is_true (scm_rational_p (v)), v, pos, FUNC_NAME, "real"); \
|
||||
SCM_ASSERT_TYPE (scm_is_real (v), v, pos, FUNC_NAME, "real"); \
|
||||
} while (0)
|
||||
|
||||
/* Templace getters and setters. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue