diff options
author | Mark H Weaver <mhw@netris.org> | 2011-03-01 12:46:38 -0500 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2011-03-08 17:52:52 -0500 |
commit | ae255d65c39de0532df1a2b1da7a14d94e5e3bc6 (patch) | |
tree | 31136d1b3a7e7b1addc9f67ecdd1960461ace11b /libguile/bytevectors.c | |
parent | 0176bbb71705434f3fbbfe67cd00a7ae3d7cf079 (diff) | |
download | guile-ae255d65c39de0532df1a2b1da7a14d94e5e3bc6.tar.gz |
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.
Diffstat (limited to 'libguile/bytevectors.c')
-rw-r--r-- | libguile/bytevectors.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libguile/bytevectors.c b/libguile/bytevectors.c index f01469774..a969e3bb4 100644 --- a/libguile/bytevectors.c +++ b/libguile/bytevectors.c @@ -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. */ |